diff options
author | June McEnroe <june@causal.agency> | 2013-10-30 13:39:20 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2013-10-30 13:39:20 -0400 |
commit | 86687eecf1e9794bc081287cb615f2bed5b1fbad (patch) | |
tree | 2397bb65ab16a875eb2e554a3ade7a9700c044b0 | |
parent | Only load chruby if it exists (diff) | |
download | src-86687eecf1e9794bc081287cb615f2bed5b1fbad.tar.gz src-86687eecf1e9794bc081287cb615f2bed5b1fbad.zip |
Show hostname in prompt over SSH
-rw-r--r-- | .zshrc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc index b0c15105..4761b028 100644 --- a/.zshrc +++ b/.zshrc @@ -35,7 +35,8 @@ bindkey "\e[F" end-of-line autoload colors zsh/terminfo colors -PROMPT=$'%{$terminfo[bold]$fg[green]%}[%{$fg[blue]%}%30<..<%~$(gitprompt)%{$fg[green]%}]%(!.#.$)%{$terminfo[sgr0]$reset_color%} ' +[ "$SSH_CLIENT" ] && PROMPT_HOST="%{$fg[magenta]%}%m:" +PROMPT=$'%{$terminfo[bold]$fg[green]%}[$PROMPT_HOST%{$fg[blue]%}%30<..<%~$(gitprompt)%{$fg[green]%}]%(!.#.$)%{$terminfo[sgr0]$reset_color%} ' RPROMPT="%(?..%{$terminfo[bold]$fg[green]%}[%{$fg[red]%}%?%{$fg[green]%}]%{$terminfo[sgr0]%})" # Libs and stuff |