mirror of https://github.com/bjeanes/dotfiles.git
Only show '@' in prompt when a user is present
parent
1cb715649c
commit
cf09f1b575
|
@ -57,7 +57,6 @@ function prompt_pwd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# - Make '@' not present when SSHd in as 'bjeanes'
|
|
||||||
function precmd {
|
function precmd {
|
||||||
vcs_info
|
vcs_info
|
||||||
|
|
||||||
|
@ -76,10 +75,12 @@ function precmd {
|
||||||
if [[ "$user" == "root" ]] then
|
if [[ "$user" == "root" ]] then
|
||||||
user_at_host="$pr_red$user_at_host$pr_reset"
|
user_at_host="$pr_red$user_at_host$pr_reset"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
user_at_host+="@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$SSH_TTY" ]]; then
|
if [[ -n "$SSH_TTY" ]]; then
|
||||||
user_at_host+="$pr_blue@`hostname -s`$pr_reset"
|
user_at_host+="$pr_blue`hostname -s`$pr_reset"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local rev="$pr_grey$vcs_info_msg_0_$pr_reset"
|
local rev="$pr_grey$vcs_info_msg_0_$pr_reset"
|
||||||
|
|
Loading…
Reference in New Issue