.profile: Add a prefix for my portable Linux install
This commit is contained in:
7
.profile
7
.profile
@@ -173,8 +173,13 @@ _ps1() {
|
||||
fg_bold="\e[1m"
|
||||
|
||||
# Add hostname prefix in SSH sessions
|
||||
# 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_yellow}ss${r}"
|
||||
fi
|
||||
if [ "$SSH_CLIENT" ]; then
|
||||
prefix="${fg_bold}${fg_red}$(hostname)${r}${fg_red}:"
|
||||
prefix="${fg_bold}${fg_red}$(hostname)${r}${fg_red}:${prefix}"
|
||||
fi
|
||||
# Append a "restricted" prefix in rbash
|
||||
if [ "$0" = "rbash" ]; then
|
||||
|
Reference in New Issue
Block a user