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

アーカイブの一覧に戻る

Keith Marshall keith****@users*****
Sat Apr 14 19:13:16 JST 2018


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13/04/18 18:27, Eli Zaretskii wrote:
>> From: Robert Dailey <rcdai****@gmail*****> Date: Fri, 13 Apr
>> 2018 10:42:18 -0500
>> 
>> First, there's a long-standing issue over on the Git for Windows 
>> project page here: 
>> https://github.com/git-for-windows/git/issues/1220
>> 
>> The gist of the problem is that invoking aliases in Git using
>> curly brackets results in those curly brackets being stripped
>> out. Example:
>> 
>> $ 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".

>> This does not happen when I do not use an alias, it only occurs 
>> through an alias that results in sh.exe being invoked to run 
>> subcommands after the alias has been processed.
>> 
>> I'm bringing up this issue on the Mingw users list for 2
>> reasons:
>> 
>> 1. To confirm whether or not this is a bug that Mingw can fix 2.
>> If it's a Mingw, I need permission to create this as a bug on
>> the mingw project page (the create issue button is disabled and
>> says I lack permissions): https://sourceforge.net/p/mingw/bugs/

You need to be logged-in to your OSDN.net user account, to create, or
to contribute to tickets; create one if necessary.

> AFAIK, Git for Windows switched to using MinGW64, so you are
> posting this to the wrong forum.

Notwithstanding, this looks like a simple case of user error to me.

- -- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJa0dQ7AAoJEMCtNsY0flo/lNwP/2YahvlisnsaP8aGmAwqDzCM
+T+nKHs68adt45otgwa+jF/Ymp8sP3owouW/MCub290zwtPagYoqFd9zkCCFp/Ru
a5bOe1crv3c+0yPHswfU8l66pFGTEydXRExw5y3+U9Z9MXFnaCIVmSqi2OlxTwYe
rsW9BsLRQELUPR5tyzvh7yvu1+0Mcv6oZlHp1EIHVEHMGZgoP0V3hxNG72GUkAsn
Df6jzJBgiwN0wP8BbeqlD/tqa3qgR7ylRb92QIqRZ8/ARLnBEUuybbE0vi1Rlo54
YB2oHLSn+5LaJI/hW9/cZGtMeAhFtsLHEJifn7XtMXTosp0ZIA1BfQU9CgxoTjOm
TmvjImIcy5x2i/EdIwqxzqXyo6zGOmfYDNIcVVfgpeujwUGqlKiQcMHRXl9lNwq5
BmByHhULOb6KkUShfjxNdVE0JbRW4F5tMxkQo9lw0vOZtM4EMCPeylKGSabJpmoL
RoJPSohGhTurj1yf/0xjtyxrSVi5Ur1x4hocWxL6HhENcJNvmkXcR06tTgG9PZk7
Z8fyr5Q82rMUUjefg6Q/C498Eqh+8RB7aHODkbshnoy+rNOuQSGtG7H6noEOLjLR
DyrDFHUL+ALxH6MBzmmGaNHGFFMTh98RZyZ6o2aVoXdTe5IuSj9hDjdrLK2bnwDe
1gRT0eNJWQQ3W8Z0CkCz
=63L0
-----END PGP SIGNATURE-----




More information about the MinGW-Users mailing list
アーカイブの一覧に戻る