私はこのようなgitconfigを持っています:
[alias]
l = "!source ~/.githelpers && pretty_git_log"
私がそれを実行すると、私はこれを取得します:
[desktop] git l
source ~/.githelpers && pretty_git_log: 1: source: not found
error: cannot run source ~/.githelpers && pretty_git_log: No such file or directory
fatal: While expanding alias 'l': 'source ~/.githelpers && pretty_git_log': No such file or directory
テストする他のシェルビルトインを追加すると、正常に実行されます。
[alias]
l = "!echo running from the builtin"
[desktop] git l
running from the builtin
ソースコマンドがgitから見つからない理由はありますか?私はzshを実行していますが、bashに変更しても違いはないようです。
[desktop] bash
[desktop] git l
source ~/.githelpers && pretty_git_log: 1: source: not found
error: cannot run source ~/.githelpers && pretty_git_log: No such file or directory
fatal: While expanding alias 'l': 'source ~/.githelpers && pretty_git_log': No such file or directory