Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
fbf4a78a
Commit
fbf4a78a
authored
Jun 02, 2014
by
Marc Cornellà
Committed by
ncanceill
Jun 06, 2014
Browse files
Show user prompt in gnzh theme regardless of UID
Fixes #2008.
parent
a9e1d9aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
themes/gnzh.zsh-theme
View file @
fbf4a78a
...
@@ -14,11 +14,11 @@ eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
...
@@ -14,11 +14,11 @@ eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
eval PR_BOLD="%{$terminfo[bold]%}"
eval PR_BOLD="%{$terminfo[bold]%}"
# Check the UID
# Check the UID
if [[ $UID -
g
e
100
0 ]]; then # normal user
if [[ $UID -
n
e 0 ]]; then # normal user
eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}'
eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}'
eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}'
eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}'
local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR'
local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR'
el
if [[ $UID -eq 0 ]]; then
# root
el
se
# root
eval PR_USER='${PR_RED}%n${PR_NO_COLOR}'
eval PR_USER='${PR_RED}%n${PR_NO_COLOR}'
eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment