Color hostname whether you're root or in ssh
This commit is contained in:
parent
6c77b81b43
commit
d61c4d5e03
|
@ -104,11 +104,8 @@ prompt_init() {
|
|||
zstyle ':vcs_info:git*' formats ':%b'
|
||||
zstyle ':vcs_info:git*' actionformats ':%b (%a)'
|
||||
|
||||
# show username@host if logged in through SSH
|
||||
[[ "$SSH_CONNECTION" != '' ]] && prompt_username='%n@%m '
|
||||
|
||||
# show username@host if root, with username in white
|
||||
[[ $UID -eq 0 ]] && prompt_username='%F{white}%n%F{242}@%m '
|
||||
# show username@host if logged in through SSH OR logged in as root
|
||||
[[ "$SSH_CONNECTION" != '' || "$UID" -eq 0 ]] && prompt_username='%F{white}%n%F{244}@%m '
|
||||
|
||||
## Vim cursors
|
||||
N_MODE="%F{blue}## "
|
||||
|
|
Loading…
Reference in a new issue