aboutsummaryrefslogtreecommitdiff
path: root/home/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to 'home/.bashrc')
-rw-r--r--home/.bashrc11
1 files changed, 8 insertions, 3 deletions
diff --git a/home/.bashrc b/home/.bashrc
index 6610b34..6f6711e 100644
--- a/home/.bashrc
+++ b/home/.bashrc
@@ -16,10 +16,10 @@ fi
16# conditionally based on what kind of user is logged in. 16# conditionally based on what kind of user is logged in.
17# 17#
18# Breakdown of PS1 components: 18# Breakdown of PS1 components:
19# [TTY#] [DATE TIME] [USER HOST] [DIR] > 19# [TTY#] [DATE TIME] [USER HOST] [(BRANCH) DIR] >
20# 20#
21# Example of what the prompt should look like: 21# Example of what the prompt should look like:
22# [1] [2023-03-28 16:02:55] [user host] [/etc/portage] > 22# [1] [2023-03-28 16:02:55] [user host] [(stable) /etc/portage] >
23######################################################################### 23#########################################################################
24# Set colors for easy reading 24# Set colors for easy reading
25PS1_COLOR_RESET="\[\e[0m\]" 25PS1_COLOR_RESET="\[\e[0m\]"
@@ -59,8 +59,13 @@ PS1+="$PS1_COLOR_GREY@$PS1_COLOR_RESET" # @
59PS1+="$PS1_COLOR_BLUE\h$PS1_COLOR_RESET" # HOST 59PS1+="$PS1_COLOR_BLUE\h$PS1_COLOR_RESET" # HOST
60PS1+="$PS1_COLOR_MAIN] $PS1_COLOR_RESET" # ] 60PS1+="$PS1_COLOR_MAIN] $PS1_COLOR_RESET" # ]
61 61
62# [DIR] > 62# [(BRANCH) DIR] >
63parse_git_branch() {
64 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' \
65 | awk '{$1=$1;print}'
66}
63PS1+="$PS1_COLOR_MAIN[$PS1_COLOR_RESET" # [ 67PS1+="$PS1_COLOR_MAIN[$PS1_COLOR_RESET" # [
68PS1+="\$(parse_git_branch) " # (BRANCH)
64PS1+="$PS1_COLOR_CYAN\w$PS1_COLOR_RESET" # DIR 69PS1+="$PS1_COLOR_CYAN\w$PS1_COLOR_RESET" # DIR
65PS1+="$PS1_COLOR_MAIN] > $PS1_COLOR_RESET" # ] > 70PS1+="$PS1_COLOR_MAIN] > $PS1_COLOR_RESET" # ] >
66######################################################################### 71#########################################################################