鱼壳在启动时引发错误。参数数量错误

几个月来我一直在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
capt_feng 回答:鱼壳在启动时引发错误。参数数量错误

但是,即使显示为0,也似乎有1个参数。

嗯,不是真的。

所需的1个参数是扩展后的 。在这种情况下,它将运行uname,并将其输出用作switch的参数。

您似乎已对系统进行了某些更改,以致uname不再打印任何内容-也许您添加了一个名为uname的函数,或者更改了$ PATH从而使uname不再包含。

本文链接:https://www.f2er.com/2696738.html

大家都在问