Variable names in prompt instead of path

有些话、适合烂在心里 提交于 2019-12-11 04:28:39

问题


How can I prevent my zsh prompt from showing the variable name a path is assigned to instead of the path itself?

foo="/some/path"
cd "$foo"

shows $ ~foo/ in my prompt instead $ /some/path/


回答1:


From the comments:

you're seeing Named Directories. Check if AUTO_NAME_DIRS is set (setopt | grep AUTO_NAME_DIRS) - to disable this functionality, turn it off.



来源:https://stackoverflow.com/questions/16203555/variable-names-in-prompt-instead-of-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!