我正在使用 oh-my-zsh 在 .zshrc 中有以下别名:
alias composer="php -d memory_limit=-1 $(which composer)"
我得到以下输出:
$ composer
Could not open input file: composer:
对于:
$ which composer
composer: aliased to php -d memory_limit=-1 composer: aliased to php -d memory_limit=-1 composer: aliased to php -d memory_limit=-1 /usr/local/bin/composer
$ zsh --version
zsh 5.2 (x86_64-apple-darwin15.4.0)
在 Linux 下它按预期工作:
$ which composer
composer: aliased to php -d memory_limit=-1 /usr/bin/composer
$ zsh --version
zsh 5.3.1 (x86_64-unknown-linux-gnu)