From 3f9a4e2827c146e9435389de7b9a934615255f10 Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 15 Jan 2020 20:13:44 +0000 Subject: [PATCH] .profile: Clean up, make ssh sessions simpler --- .profile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.profile b/.profile index 78bfd04c..40866dbc 100755 --- a/.profile +++ b/.profile @@ -282,24 +282,16 @@ _ps1bash() { # Add hostname prefix in SSH sessions unset prefix - # Yes, shellcheck. I get it. That's what the or is for - #shellcheck disable=2039 - if [ "$HOSTNAME" = "phys-saltshaker" ] || [ "$(hostname)" = "phys-saltshaker" ]; then - prefix="${fg_bold}${fg_grey}ss${r}${fg_grey}:${r}" - fi + # Alert if in an SSH session if [ "$SSH_CLIENT" ]; then - prefix="${fg_bold}${fg_red}$(hostname)${r}${fg_red}:${r}${prefix}" - fi - # Append "vim" in Vim - if [ -n "$VIM_TERMINAL" ]; then - prefix="${fg_bold}${fg_green}*${r}" + prefix="${fg_bold}${fg_red}ssh${r}${fg_red}:${r}${prefix}" fi # Change PWD color depending on the shell case $0 in *bash) prefix="${prefix}${fg_blue}" ;; - /bin/ksh) + *ksh) prefix="${prefix}${fg_green}" ;; *)