Permalink
Browse files

Using SHLVL wasn't working on all my machines, so I just made my own

  • Loading branch information...
1 parent 71cf47b commit a8b8d93605bd622c0a8d59800ced085ba5de7f92 Derek Wyatt committed Mar 19, 2012
Showing with 8 additions and 2 deletions.
  1. +2 −2 zsh_custom/themes/gnzh.zsh-theme
  2. +6 −0 zshrc
@@ -23,8 +23,8 @@ elif [[ $UID -eq 0 ]]; then # root
eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
fi
-if [[ $SHLVL -gt 1 ]]; then
- local PR_PROMPT="$PR_PROMPT [$(($SHLVL-1))]"
+if [[ ${MY_SHELL_LEVEL:-0} -gt 1 ]]; then
+ local PR_PROMPT="$PR_PROMPT [$(($MY_SHELL_LEVEL-1))]"
fi
# Check if we are on SSH or not
View
@@ -16,6 +16,12 @@ ZSH_THEME=""
# Uncomment following line if you want red dots to be displayed while waiting for completion
COMPLETION_WAITING_DOTS="true"
+if [[ -z ${MY_SHELL_LEVEL:-0} ]]; then
+ export MY_SHELL_LEVEL=0
+else
+ export MY_SHELL_LEVEL=$(($MY_SHELL_LEVEL+1))
+fi
+
export ZSH_CUSTOM=~/.dotfiles/zsh_custom
plugins=(git regex-dirstack)
source $ZSH/oh-my-zsh.sh

0 comments on commit a8b8d93

Please sign in to comment.