几个月来我一直在Mac上使用鱼壳,没有任何问题。突然,当我打开终端时,收到以下错误消息:
/usr/local/share/fish/functions/__fish_pwd.fish (line 1):
uname
^
in command substitution
called on line 1 of file /usr/local/share/fish/functions/__fish_pwd.fish
from sourcing file /usr/local/share/fish/functions/__fish_pwd.fish
called on line 2 of file /usr/local/share/fish/functions/fish_title.fish
in command substitution
called on line 2 of file /usr/local/share/fish/functions/fish_title.fish
in command substitution
called on line 3 of file /usr/local/share/fish/functions/fish_title.fish
in function 'fish_title'
called on standard input
in command substitution
called on standard input
/usr/local/share/fish/functions/__fish_pwd.fish (line 1): switch: Expected exactly one argument,got 0
switch (uname)
^
from sourcing file /usr/local/share/fish/functions/__fish_pwd.fish
called on line 2 of file /usr/local/share/fish/functions/fish_title.fish
in command substitution
called on line 2 of file /usr/local/share/fish/functions/fish_title.fish
in command substitution
called on line 3 of file /usr/local/share/fish/functions/fish_title.fish
in function 'fish_title'
called on standard input
in command substitution
called on standard input
/usr/local/share/fish/functions/fish_title.fish (line 1):
__fish_pwd
^
in command substitution
called on line 3 of file /usr/local/share/fish/functions/fish_title.fish
in function 'fish_title'
called on standard input
in command substitution
called on standard input
我看到参数数量有问题。但是,即使说有0,它似乎也有1个参数。这是__fish_pwd.fish文件的内容:
switch (uname)
case 'CYGWIN_*'
function __fish_pwd --description "Show current path"
pwd | sed -e 's-^/cygdrive/\(.\)/\?-\u\1:/-'
end
case '*'
function __fish_pwd --description "Show current path"
pwd
end
end
这是config.fish不起作用时的内容。删除最后一行export PATH=$M3:$PATH
解决了该问题。
# put ~/.local/bin/ in my path
set PATH ~/.local/bin $PATH
# spark
set SPARK_HOME /usr/local/Cellar/apache-spark/2.4.4
set PATH $SPARK_HOME/bin:$PATH
set -x PYSPARK_PYTHON python3.7
# sbt: build tool for scala and java
export M3_HOME=/usr/local/etc/sbtopts
export M3=$M3_HOME/bin
export PATH=$M3:$PATH