Я использую оболочку fi sh на ма c в течение нескольких месяцев без проблем. Внезапно, когда я открываю терминал, я получаю следующее сообщение об ошибке:
/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
Я вижу, что существует проблема с количеством аргументов. Однако, похоже, что есть 1 аргумент, хотя он говорит, что есть 0. Вот содержимое файла __fish_pwd.fi sh:
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.fi sh когда это не работало. Удаление последней строки 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