Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sonukapoor/a35055ab8553a056dca6aaf60e16fbe8 to your computer and use it in GitHub Desktop.
Save sonukapoor/a35055ab8553a056dca6aaf60e16fbe8 to your computer and use it in GitHub Desktop.
Set current directory in prompt of iTerm - Oh My Zsh
For the people asking about to show only the current path, do this:
- Open this directory ~/.oh-my-zsh/themes
- Open the agnoster.zsh-theme file with any text editor
- Go to the prompt_dir() function
- Replace the line in the function with this: prompt_segment blue black '%c'
- Restart iTerm or enter source ~/.zshrc
- Done. Now the theme only shows the current path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment