show host only when using ssh
This commit is contained in:
parent
a0470d487e
commit
6bb317b358
1 changed files with 2 additions and 5 deletions
|
@ -72,12 +72,10 @@ precmd.prompt.user() {
|
|||
(( UID )) || precmd.prompt.add '#' $prompt_colors[root]
|
||||
}
|
||||
|
||||
precmd.prompt.ssh() {
|
||||
[[ -n $SSH_CONNECTION ]] && precmd.prompt.add $prompt_symbols[ssh] $prompt_colors[ssh]
|
||||
}
|
||||
|
||||
precmd.prompt.host() {
|
||||
[[ -n $SSH_CONNECTION ]] || return 0
|
||||
precmd.prompt.add %m $prompt_colors[host]
|
||||
precmd.prompt.add $prompt_symbols[ssh] $prompt_colors[ssh]
|
||||
}
|
||||
|
||||
precmd.prompt.cwd() {
|
||||
|
@ -123,7 +121,6 @@ precmd.prompt() {
|
|||
precmd.prompt.init
|
||||
precmd.prompt.host
|
||||
precmd.prompt.user
|
||||
precmd.prompt.ssh
|
||||
precmd.prompt.cwd
|
||||
precmd.prompt.ro
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue