[Mingw-users] Shell is stripping curly braces in Git for Windows

Back to archive index

Eli Zaretskii eliz****@gnu*****
Sun Apr 15 02:01:43 JST 2018


> From: Keith Marshall <keith****@users*****>
> Date: Sat, 14 Apr 2018 11:13:16 +0100
> 
> >> $ git myalias @{-1}
> 
> What is the shell?  If its GNU bash, (as our MSYS shell would be),
> then braces are special; bash performs brace expansion on the comma
> separated list within them, (and in this case, there's only one item
> in the list).  You need to quote the final argument, to suppress the
> effect of brace expansion.
> 
> >> This results in:
> >> 
> >> "git myalias @-1"
> 
> This is exactly the result I would expect, after brace expansion of
> the single item list "-1".

FWIW, invoking this command in MSYS Bash:

  $ echo @{-1}

yields @{-1}, i.e. no expansion happens.  Moreover, if I invoke a
MinGW program with this argument, it receives the literal @{-1} as
well in its argv[] array.




More information about the MinGW-Users mailing list
Back to archive index