[英]Why does typing $ in fish shell show the error "Unknown command: bind_dollar"?
我在 MacOS Monterey 12.5.1 上运行 fishshell 3.5.1 我可以很好地处理大多数命令但是每当我尝试输入美元符号时(甚至在按 Return 键之前)我都会收到错误消息: “未知命令:bind_dollar”
我试过了:
以下是我的问题和设置的输出:
我一输入美元符号就会发生这种情况:
$ fish: Unknown command: bind_dollar
鱼配置目录:
~/.config/fish
$ ls
completions/ conf.d/ config.fish fish_variables functions/
使用 /bin/sh 检查我的 $PATH:
$ /bin/sh
sh-3.2$ echo $PATH
/usr/local/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
确保鱼位于 PATH 中:
sh-3.2$ whereis fish
fish: /usr/local/bin/fish
查看我的 fish.config(默认版本)的内容:
sh-3.2$ cat config.fish
if status is-interactive
# Commands to run in interactive sessions can go here
end
多亏了 Glenn 的评论,我才得以追查到这个问题:
跑步:
grep -r bind_dollar ~/.config/fish
回来:
~/.config/fish/functions/fish_user_key_bindings.fish
其中包含:
function fish_user_key_bindings
### bang-bang ###
bind ! bind_bang
bind $ bind_dollar # <-- removing this line fixed the issue
### bang-bang ###
end
删除“bind_dollar”行解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.