Showing the directory in the zsh prompt in OS X
This is pretty basic, but I've been using zsh for a little while and was unsure how to add the directory to the prompt.
zsh on Fedora does this by default - and bash on OS X too for that matter.
When figuring out how to do this, I first checked the PROMPT variable on Fedora's zsh.
This gave me something like [%m%~]%#
When adding this to OS X's .zshrc, however, this gave me an error.
Removing the square brackets fixed this, though, so I ended up with my ~/.zshrc looking like this:
export PROMPT=%m%~%#
This will show the working directory in the zsh prompt.
Written by alyphen
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#