.profile: Clean up, make ssh sessions simpler
This commit is contained in:
parent
a45e2fe4a6
commit
3f9a4e2827
14
.profile
14
.profile
@ -282,24 +282,16 @@ _ps1bash() {
|
|||||||
|
|
||||||
# Add hostname prefix in SSH sessions
|
# Add hostname prefix in SSH sessions
|
||||||
unset prefix
|
unset prefix
|
||||||
# Yes, shellcheck. I get it. That's what the or is for
|
# Alert if in an SSH session
|
||||||
#shellcheck disable=2039
|
|
||||||
if [ "$HOSTNAME" = "phys-saltshaker" ] || [ "$(hostname)" = "phys-saltshaker" ]; then
|
|
||||||
prefix="${fg_bold}${fg_grey}ss${r}${fg_grey}:${r}"
|
|
||||||
fi
|
|
||||||
if [ "$SSH_CLIENT" ]; then
|
if [ "$SSH_CLIENT" ]; then
|
||||||
prefix="${fg_bold}${fg_red}$(hostname)${r}${fg_red}:${r}${prefix}"
|
prefix="${fg_bold}${fg_red}ssh${r}${fg_red}:${r}${prefix}"
|
||||||
fi
|
|
||||||
# Append "vim" in Vim
|
|
||||||
if [ -n "$VIM_TERMINAL" ]; then
|
|
||||||
prefix="${fg_bold}${fg_green}*${r}"
|
|
||||||
fi
|
fi
|
||||||
# Change PWD color depending on the shell
|
# Change PWD color depending on the shell
|
||||||
case $0 in
|
case $0 in
|
||||||
*bash)
|
*bash)
|
||||||
prefix="${prefix}${fg_blue}"
|
prefix="${prefix}${fg_blue}"
|
||||||
;;
|
;;
|
||||||
/bin/ksh)
|
*ksh)
|
||||||
prefix="${prefix}${fg_green}"
|
prefix="${prefix}${fg_green}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
Reference in New Issue
Block a user