I have this as a bash function:
function git开发者_运维问答s() {
git grep -i -n --color $@ -- $(git rev-parse --show-toplevel);
}
If I run this:
gits def add_crumb
I want:
git grep -i -n --color "def add_crumb" -- $(git rev-parse --show-toplevel)
The purpose of $@ is specifically to split it into individual arguments. Use "$*" if you don't want that. (Yes, with the double quotes; you should have them in "$@" as well, actually.)
加载中,请稍侯......
精彩评论