diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2017-01-04 01:23:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-04 01:23:09 +0300 |
commit | c5909e71ea873542a053531012ee62a5af3a57b8 (patch) | |
tree | c27b772d54308c8872149c58330a13a692d80862 /powerlevel9k.zsh-theme | |
parent | c86b4009ce09b1d2f274579373fa53648fd1b362 (diff) | |
parent | 37145ef14d854bfb7ca65145e9bd86cefcfba060 (diff) |
Merge pull request #369 from rjorgenson/context_host_depth
Context host depth
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 5 |
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 } |