zsh 命令未找到问题 [英] zsh command not found issue
本文介绍了zsh 命令未找到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我安装了 sublime text 2 并为其创建了一个符号链接并将其放置在 ~/bin 中.我将 ~/bin 添加到 ~/.zshrc 中的 PATH 变量.
I installed sublime text 2 and created a symlink to it and placed it in ~/bin. I added ~/bin to PATH variable in ~/.zshrc.
如果我尝试执行 subl(sublime 的符号链接),我得到:
If I try to execute subl (sublime's symlink), I get:
zsh: command not found: subl
但是如果我执行 ~/bin/subl,它就可以正常工作.
But if I execute ~/bin/subl, it works correctly.
回显 PATH 显示 ~/bin 在 PATH 变量中.:
Echoing the PATH shows that ~/bin is in the PATH variable.:
~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
知道什么会导致找不到命令的问题吗?
Any idea what can cause the command not found issue?
推荐答案
bash 在 PATH 中解释 ~
,但大多数 shell 没有.
bash interprets ~
in PATH, but most shells do not.
改用 $HOME
.
这篇关于zsh 命令未找到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文