[英]Fish shell error
I installed nvm which inserted some lines to my .profile
, I modified them to work with fish shell instead of bash: 我安装了nvm ,它将一些行插入我的
.profile
,我修改它们以使用fish shell而不是bash:
if [ "$BASH" ]
if [ -f ~/.bashrc ]
. ~/.bashrc
end
end
mesg n or true
export NVM_DIR="/root/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] and . "$NVM_DIR/nvm.sh" # This loads nvm
.. but I still get this error: ..但我仍然得到这个错误:
root@server011 ~# source /root/.profile
[: the last argument must be ']'
There is a missing semicolon: 缺少分号:
[ -s "$NVM_DIR/nvm.sh" ] ; and . "$NVM_DIR/nvm.sh"
^
I'm not sure if nvm.sh
is fish-compatible. 我不确定
nvm.sh
是否兼容鱼类。 If it is not, fish won't be able to source it. 如果不是,鱼将无法采购。
In that case, you might try fnm or this plugin . 在这种情况下,您可以尝试使用fnm或此插件 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.