Terminal is not letting me make commands unless I hit enter a bunch of times
Posted
by
ninja08
on Super User
See other posts from Super User
or by ninja08
Published on 2012-11-09T17:23:24Z
Indexed on
2012/11/09
23:06 UTC
Read the original article
Hit count: 216
terminal
Whenever I open terminal it normally allows me to immediately begin making commands. Only earlier today I did the setup for github here https://help.github.com/articles/set-up-git
And then all of a sudden the thing where I give terminal commands won't allow me to give it commands unless I hit enter a few times.
This is what it looks like:
Last login: Fri Nov 9 11:43:28 on ttys001
mysql.save: Permission denied
mysql.save: Permission denied
/Users/Nick/.zshrc:32: command not found: .
~ git: ?
~ git: ?
~ git: ?
See the big space? That's because it simply will never show the ~ git: > thing unless I hit enter 3-4 times.
Also, it never used to say ~ git: > before I did the git setup. I'm not sure what I changed.
I've checked the zshrc file and commented everything out to find the line causing the problem. I've done that and it turns out it was the
source $ZSH/oh-my-zsh.sh
Within the oh-my-zsh.sh file I've commented out each block of code for the file starting at the top and I've found that this block is causing it:
# Load the theme
if [ "$ZSH_THEME" = "random" ]
then
themes=($ZSH/themes/*zsh-theme)
N=${#themes[@]}
((N=(RANDOM%N)+1))
RANDOM_THEME=${themes[$N]}
source "$RANDOM_THEME"
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
else
if [ ! "$ZSH_THEME" = "" ]
then
if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ]
then
source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme"
else
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
fi
fi
fi
© Super User or respective owner