Reputation: 2146
Why does the alias does not have the same effect as typing the command which the alias "is equal to"? Sorry for such a short question, but it's really all right there in the picture.
Edit: Just in case this helps, here's all my aliases.
Upvotes: 0
Views: 135
Reputation: 180887
Pipes don't work in aliases since the aliases are executed by git
, not the shell.
You can do it using !
to escape to the shell and execute git recursively though;
$ git config alias.test '!git ls-files -v | grep ^h'
$ git test
h test.c
h test.py
Upvotes: 2
Reputation: 119
I think, git doesn't run git ls-files -v | grep ^h
, but just search for the command ls-files
Try with: !git ls-files -v | grep ^h
Upvotes: 1