aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorrjorgenson <rjorgenson@gmail.com>2016-12-31 06:07:26 +0300
committerrjorgenson <rjorgenson@gmail.com>2016-12-31 06:07:26 +0300
commit80ee16c16dbd745717e478e8bccc0454fcdf010f (patch)
treebdcd569f1630c3216d156dd0bb2305ea98e91788 /powerlevel9k.zsh-theme
parentc86b4009ce09b1d2f274579373fa53648fd1b362 (diff)
added custom host depth to context segment
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme5
1 files changed, 3 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 9ea12aa7..9e89f68d 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -429,12 +429,13 @@ prompt_battery() {
# Context: user@hostname (who am I and where am I)
# Note that if $DEFAULT_USER is not set, this prompt segment will always print
prompt_context() {
+ set_default POWERLEVEL9K_CONTEXT_HOST_DEPTH "%m"
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
if [[ $(print -P "%#") == '#' ]]; then
# Shell runs as root
- "$1_prompt_segment" "$0_ROOT" "$2" "$DEFAULT_COLOR" "yellow" "$USER@%m"
+ "$1_prompt_segment" "$0_ROOT" "$2" "$DEFAULT_COLOR" "yellow" "$USER@$POWERLEVEL9K_CONTEXT_HOST_DEPTH"
else
- "$1_prompt_segment" "$0_DEFAULT" "$2" "$DEFAULT_COLOR" "011" "$USER@%m"
+ "$1_prompt_segment" "$0_DEFAULT" "$2" "$DEFAULT_COLOR" "011" "$USER@$POWERLEVEL9K_CONTEXT_HOST_DEPTH"
fi
fi
}