Thread (1 message) 1 message, 1 author, 2018-02-15

Re: [PATCH 1/2] parse-options: expand $HOME on filename options

From: Junio C Hamano <hidden>
Date: 2018-02-15 18:36:25

Ævar Arnfjörð Bjarmason [off-list ref] writes:
In general I'm mildly negative on adding this, for every user like Doron
who'll be less confused by a hack like this, you'll have other users
who'll be confused about git inexplicably working with ~ in the middle
of strings, even though;

    $ echo git init --template ~/path
    git init --template /home/avar/path
    $ echo git init --template=~/path
    git init --template=~/path

I think it makes more sense to just leave such expansion to the shell,
and not try to magically expand it after the fact, since it's both
confusing (user: why does this work with git and not this other
program?), and as shown above changes existing semantics.
The above certainly is a reasonable argument.
I think this way lies madness, and it's better to just avoid it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help