aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMountain Man <43313373+MountainMan1312@users.noreply.github.com>2023-03-31 02:35:08 -0400
committerMountain Man <43313373+MountainMan1312@users.noreply.github.com>2023-03-31 02:35:08 -0400
commitad8e4d1ff12a406b281382774a3e48a27aedf1a2 (patch)
tree2a2bc1493c05b3cab2387bb053b6536bd6e681fc
parentRefactor 'PS1' prompt in 'home/.bashrc' (diff)
downloaddotfiles.old-ad8e4d1ff12a406b281382774a3e48a27aedf1a2.tar.gz
dotfiles.old-ad8e4d1ff12a406b281382774a3e48a27aedf1a2.tar.bz2
dotfiles.old-ad8e4d1ff12a406b281382774a3e48a27aedf1a2.zip
Make the 'SSH' label in '$PS1' more visible
The SSH label should jump out at you. This change makes it cyan instead of grey, to match the color of the username component.
-rw-r--r--home/.bashrc9
1 files changed, 4 insertions, 5 deletions
diff --git a/home/.bashrc b/home/.bashrc
index 946c3ef..92a4a3c 100644
--- a/home/.bashrc
+++ b/home/.bashrc
@@ -47,13 +47,12 @@ PS1+="[$TTY_NUM] [\D{%F} \t] "
47PS1+=$PS1_COLOR_RESET 47PS1+=$PS1_COLOR_RESET
48 48
49# [SSH USER@HOST] 49# [SSH USER@HOST]
50PS1+=$PS1_COLOR_MAIN 50PS1+="$PS1_COLOR_MAIN[$PS1_COLOR_RESET" # [
51if [[ "$SSH_TTY" == "/dev/pts"* ]]; then # if this is SSH session 51if [[ "$SSH_TTY" == "/dev/pts"* ]]; then # if this is SSH session
52 PS1+="[SSH " # add "[SSH " 52 PS1+=$PS1_COLOR_CYAN #
53else # if not 53 PS1+="SSH " # add "SSH "
54 PS1+="[" # don't 54 PS1+=$PS1_COLOR_RESET
55fi 55fi
56PS1+=$PS1_COLOR_RESET
57 56
58PS1+="$PS1_COLOR_CYAN\u$PS1_COLOR_RESET" # USER 57PS1+="$PS1_COLOR_CYAN\u$PS1_COLOR_RESET" # USER
59PS1+="$PS1_COLOR_GREY@$PS1_COLOR_RESET" # @ 58PS1+="$PS1_COLOR_GREY@$PS1_COLOR_RESET" # @