summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-08-04 06:38:38 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-08-04 06:38:38 +0530
commit9fd3208247e5c37d7453f2bb33acd09120fddec6 (patch)
tree2f068783f4ffa28c07438f7b6839cce9900b4a59
parent217f3eb58f95a4fb029b0b356823439304d08a4d (diff)
changes made to PS1: git branch and curly brackets
-rw-r--r--.bashrc3
1 files changed, 2 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index dba6071..0f3e901 100644
--- a/.bashrc
+++ b/.bashrc
@@ -12,7 +12,8 @@
alias ls='ls --color=auto'
-export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
+export PS1="\[$(tput bold)\]\[$(tput setaf 1)\]{\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[\033[38;5;10m\]\$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/')\[$(tput sgr0)\]\[$(tput setaf 1)\]}\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
+
#auto cd
## Allows you to cd into directory merely by typing the directory name.