From 9fd3208247e5c37d7453f2bb33acd09120fddec6 Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Thu, 4 Aug 2022 06:38:38 +0530 Subject: changes made to PS1: git branch and curly brackets --- .bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.bashrc') 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. -- cgit v1.2.3