Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit a8b8d93605bd622c0a8d59800ced085ba5de7f92 1 parent 71cf47b
Derek Wyatt authored
Showing with 8 additions and 2 deletions.
  1. +2 −2 zsh_custom/themes/gnzh.zsh-theme
  2. +6 −0 zshrc
View
4 zsh_custom/themes/gnzh.zsh-theme
@@ -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
6 zshrc
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.