Home » Questions » Computers [ Ask a new question ]

Using zsh extensions - why do I have to manually type "zsh" to get it to appear?

Using zsh extensions - why do I have to manually type "zsh" to get it to appear?

I am using Robby Russell's "oh-my-zsh" extension on OSX 10.5 Leopard. However I find that it's not loaded by default.. when I start a new Terminal it uses the "default" ZSH prompt, and I must manually type "zsh" and press Return to get the "enhanced" prompt. My .zshrc file lists the ZSH path as pointing to the oh-my-zsh directory:

Asked by: Guest | Views: 258
Total answers/comments: 2
Guest [Entry]

"Back in 10.4, Terminal has a preference for “When creating a new Terminal window” to either use /usr/bin/login or to let the user specify a command. I expect that Terminal in 10.5 has something similar.

Do you happen to have something like zsh -f as the specified command instead of using /usr/bin/login or a zsh invocation without -f? The -f option will cause zsh to ignore all the startup files except /etc/zshenv (i.e. it will ignore your ~/.zshrc).

Another way to check this setting might be with defaults read com.apple.Terminal Shell. If it shows some output you have a custom setting. If it is blank or does not exist then you are probably still using the default of /usr/bin/login.

Edited to add:
In one of your shells with the default prompt (a new Terminal window or tab), check for the following:

Does set -o | fgrep rcs show “on” for norcs?
Does [[ ""$ZDOTDIR"" -ef ""$HOME"" ]] || echo ""ZDOTDIR=$ZDOTDIR"" show anything?

If one or both of these conditions are true, you'll need to track down where they are being set. Note that norcs might be set with any of set +o rcs, set -o norcs, setopt norcs, unsetopt rcs, or set -f. Also the option names are not case sensitive and may have underscores inserted anythere (NO_rC___s is the same as norcs). Look in /etc/zshenv, /etc/zprofile, /etc/zshrc, /etc/zlogin; and .zshenv, .zprofile, .zshrc, and .zlogin from your ZDOTDIR directory.

It might also be useful to know the full parentage of your “default prompt” shells (pstree -wp $$ if you have pstree from (e.g.) MacPorts). Maybe the normal ‘rc’ process is being interrupted by something like zsh -f in an ‘rc’ file."
Guest [Entry]

I had this problem. It was due to having a .zlogin in my home directory. Once I removed .zlogin oh my zsh worked