I am not able to see path of my current directory or even username in terminal while using zsh. I was able to see it until few days back. Now it just shows blank. I tried uninstalling oh-my-zsh but it dint work. If I switch to bash, then I can see path. I have tried restarting my mac as well but no luck.

Currently, terminal looks like below: Current terminal

Until few days back, it used to look like below: Terminal with path bar

Below is my .zshrc

# Path to your oh-my-zsh installation.
export ZSH=/Users/vishalsingh/.oh-my-zsh

# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.

# Uncomment the following line to use case-sensitive completion.

# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.

# Uncomment the following line to disable bi-weekly auto-update checks.

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line to disable colors in ls.

# Uncomment the following line to disable auto-setting terminal title.

# Uncomment the following line to enable command auto-correction.

# Uncomment the following line to display red dots whilst waiting for completion.

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.

# User configuration

# export PATH="/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
# export MANPATH="/usr/local/man:$MANPATH"

source $ZSH/oh-my-zsh.sh

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
  • Where exactly to you want to see the current path? In the Windows/Tab title, in the shell prompt or somewhere else? – nohillside Aug 21 '16 at 7:37
  • I added screenshots. I want to see path in shell prompt on each line like the second screenshot. – Vishal Singh Aug 21 '16 at 7:55
  • Can you post the content of your .zshrc ? I looks like you have PROMPT THEMES enable. – fd0 Aug 21 '16 at 13:58
  • Posted content of my .zshrc – Vishal Singh Aug 21 '16 at 14:14

Oh my, omz is setting the PROMPT variable. Let's get you a temporary bash-like prompt in your current zsh session.

PROMPT='%m:%1~ %n%#'

Your omz installation is hosed. I recommend that you uninstall it. Install it again, if you want to or read the following sections of the zsh manuals.

man -P 'less -p "EXPANSION OF PROMPT"' zshall

to craft your own custom prompt in your .zshrc and if you are interested in themes

man -P 'less -p "PROMPT THEMES"' zshall    
  • I uninstalled omz, still no luck. Uninstallation changed my default shell to bash. I changed it back to zsh and still the same problem. – Vishal Singh Aug 21 '16 at 16:22
  • .zshrc file is blank now. – Vishal Singh Aug 21 '16 at 16:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .