4
爲了簡化我的關心,我把它縮小到以下幾點:傳遞的所有參數git的別名
我定義爲這樣的GIT別名:
cii = "!f() { git commit "[email protected]"; }; f"
當我運行
$ git cii -m "test1"
它工作正常,但它失敗
$ git cii -m "test1 and test2"
error: pathspec 'and' did not match any file(s) known to git.
error: pathspec 'test2' did not match any file(s) known to git.
有什麼想法?
請注意,我的真實別名比上述複雜得多,因此用 cii =「commit」進行響應不是一種選擇。這裏的要點是將輸入參數傳遞給函數。
爲什麼「和」?爲什麼不只是git cii -m test test1? – CCC 2013-06-17 21:48:04