具有别名的作曲家:无法打开输入文件
Composer with alias: Could not open input file
我知道这个问题已经被问过很多次了,但我找不到我的具体案例。我在 Debian 上使用 SSH 访问共享主机。执行命令时
/usr/bin/php7.1-cli /xxxxxxxxx/www/composer.phar
它在任何文件夹中都能完美运行。将相同的命令 1:1 放入 bashrc 中的别名时,如
alias composer='/usr/bin/php7.1-cli /xxxxxxxxx/www/composer.phar'
我收到 "Could not open input file" 错误。我错过了什么?
编辑:当通过命令 "alias" 在每一行中显示别名时,单词 "alias" 的 "a" 被一个撇号替换:
'lias composer='/usr/bin/php7.1-cli /xxxxxxxxx/www/composer.phar'
因此,在将 .bash_profile 文件从 CR+LF 更改为 LF 后,它得到了正确处理。这对 .bashrc 不起作用,但现在这个部分成功对我来说已经足够了。
我知道这个问题已经被问过很多次了,但我找不到我的具体案例。我在 Debian 上使用 SSH 访问共享主机。执行命令时
/usr/bin/php7.1-cli /xxxxxxxxx/www/composer.phar
它在任何文件夹中都能完美运行。将相同的命令 1:1 放入 bashrc 中的别名时,如
alias composer='/usr/bin/php7.1-cli /xxxxxxxxx/www/composer.phar'
我收到 "Could not open input file" 错误。我错过了什么?
编辑:当通过命令 "alias" 在每一行中显示别名时,单词 "alias" 的 "a" 被一个撇号替换:
'lias composer='/usr/bin/php7.1-cli /xxxxxxxxx/www/composer.phar'
因此,在将 .bash_profile 文件从 CR+LF 更改为 LF 后,它得到了正确处理。这对 .bashrc 不起作用,但现在这个部分成功对我来说已经足够了。