|
|
|
|
|
by jolmg
2048 days ago
|
|
Seems it's to allow implicit and explicit use of arguments passed to alias. Git does the following to the alias string[1]: argv_array_pushf(out, "%s \"$@\"", argv[0]);
So, you can have aliases like `!grep foobar` to automatically accept arguments or aliases like yours that use arguments explicitly.I've done aliases like `!bash -c 'foo $1' sh` before, but on seeing yours, I see that it was unnecessary to re-wrap with bash. [1] https://github.com/git/git/blob/e31aba42fb12bdeb0f850829e008... |
|