Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含可执行文件的本地目录(例如 foo_dir/bin/bar)。我输入了“foo”,但没有建议使用 foo_dir。出来的是 $PATH 中的其他程序(例如 bootlogd)。
我应该如何配置我的 zshrc?谢谢
我认为添加“。” 到您的 $PATH 变量将解决此问题。默认情况下,$PATH 包含标准 bin 目录,即 /usr/bin、/bin、/usr/local/bin。
我通过“setopt autocd”找到了一个可行的解决方案,但副作用是在执行某个目录时,你会 cd 进入它。