aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMountain Man <43313373+MountainMan1312@users.noreply.github.com>2023-03-31 02:12:23 -0400
committerMountain Man <43313373+MountainMan1312@users.noreply.github.com>2023-03-31 02:12:23 -0400
commit45f2126980e54719c8ba0c8481c45e4a2aefcef0 (patch)
treee5035831b324bbb93691f4feb96bd51c99b36701
parentCreate 'nano' config file 'home/.nanorc' (diff)
downloaddotfiles.old-45f2126980e54719c8ba0c8481c45e4a2aefcef0.tar.gz
dotfiles.old-45f2126980e54719c8ba0c8481c45e4a2aefcef0.tar.bz2
dotfiles.old-45f2126980e54719c8ba0c8481c45e4a2aefcef0.zip
Refactor 'PS1' prompt in 'home/.bashrc'
Made the 'PS1' prompt a bit shorter and easier to read. It now more closely reflects what the prompt actually looks like.
-rw-r--r--home/.bashrc37
1 files changed, 9 insertions, 28 deletions
diff --git a/home/.bashrc b/home/.bashrc
index bc962d1..946c3ef 100644
--- a/home/.bashrc
+++ b/home/.bashrc
@@ -50,39 +50,20 @@ PS1+=$PS1_COLOR_RESET
50PS1+=$PS1_COLOR_MAIN 50PS1+=$PS1_COLOR_MAIN
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+="[SSH " # add "[SSH "
53else 53else # if not
54 PS1+="[" 54 PS1+="[" # don't
55fi 55fi
56PS1+=$PS1_COLOR_RESET 56PS1+=$PS1_COLOR_RESET
57 57
58PS1+=$PS1_COLOR_CYAN 58PS1+="$PS1_COLOR_CYAN\u$PS1_COLOR_RESET" # USER
59PS1+="\u" 59PS1+="$PS1_COLOR_GREY@$PS1_COLOR_RESET" # @
60PS1+=$PS1_COLOR_RESET 60PS1+="$PS1_COLOR_BLUE\h$PS1_COLOR_RESET" # HOST
61 61PS1+="$PS1_COLOR_MAIN] $PS1_COLOR_RESET" # ]
62PS1+=$PS1_COLOR_GREY
63PS1+="@"
64PS1+=$PS1_COLOR_RESET
65
66PS1+=$PS1_COLOR_BLUE
67PS1+="\h"
68PS1+=$PS1_COLOR_RESET
69
70PS1+=$PS1_COLOR_MAIN
71PS1+="] "
72PS1+=$PS1_COLOR_RESET
73 62
74# [DIR] > 63# [DIR] >
75PS1+=$PS1_COLOR_MAIN 64PS1+="$PS1_COLOR_MAIN[$PS1_COLOR_RESET" # [
76PS1+="[" 65PS1+="$PS1_COLOR_CYAN\w$PS1_COLOR_RESET" # DIR
77PS1+=$PS1_COLOR_RESET 66PS1+="$PS1_COLOR_MAIN] > $PS1_COLOR_RESET" # ] >
78
79PS1+=$PS1_COLOR_CYAN
80PS1+="\w"
81PS1+=$PS1_COLOR_RESET
82
83PS1+=$PS1_COLOR_MAIN
84PS1+="] >"
85PS1+=$PS1_COLOR_RESET
86########################################################################## 67##########################################################################
87 68
88 69