Detect ssh in bashrc
This commit is contained in:
parent
16b62a92a3
commit
2f3a390f5a
9
bashrc
9
bashrc
|
@ -57,11 +57,16 @@ if [ -n "$force_color_prompt" ]; then
|
|||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1="\033[1;35m╭── \u\033[33m::\033[34m\w\033[0m\n\033[35m╰▶ \033[0m"
|
||||
if [[ -n "$SSH_CLIENT" ]] || [[ -n "$SSH2_CLIENT" ]]; then
|
||||
color="\033[1;35m"
|
||||
else
|
||||
color="\033[1;32m"
|
||||
fi
|
||||
PS1="${color}╭── \u\033[33m::\033[34m\w\033[0m\n${color}╰▶ \033[0m"
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
unset color_prompt force_color_prompt color
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
|
|
Loading…
Reference in New Issue