|
@@ -0,0 +1,20 @@
|
|
|
+# Add a blank line before the promp
|
|
|
+precmd() { print "" }
|
|
|
+
|
|
|
+# Change user color if elevated permissions
|
|
|
+if [[ $UID == 0 || $EUID == 0 ]]; then
|
|
|
+ # root
|
|
|
+ USER_COLOR="red"
|
|
|
+else
|
|
|
+ USER_COLOR="green"
|
|
|
+fi
|
|
|
+
|
|
|
+# Set the prompt
|
|
|
+#PROMPT="%{$fg[$USER_COLOR]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%~%{$reset_color%} $(git_prompt_info)"$'\n'"%{$fg[$USER_COLOR]%}>%{$reset_color%} "
|
|
|
+PROMPT='%{$fg[$USER_COLOR]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)'$'\n''%{$fg[$USER_COLOR]%}>%{$reset_color%} '
|
|
|
+
|
|
|
+# git prompt data
|
|
|
+ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
|
|
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
|
|
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ✗"
|
|
|
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green] ✔"
|