1
0
Fork 0

bashrc: dead simple prompt

This commit is contained in:
Pratham Patel 2024-01-08 17:05:12 +05:30
parent e690586d65
commit ecb02c6491
Signed by: thefossguy
SSH Key Fingerprint: SHA256:/B3wAg7jnMEBQ2JwkebbS/eXVZANDmqRfnd9QkIhxMI
1 changed files with 1 additions and 13 deletions

14
.bashrc
View File

@ -116,20 +116,8 @@ if command -v nvim > /dev/null; then
fi
# PS1 setup
_RED="$(tput setaf 1)"
_BR_RED="$(tput bold)${_RED}"
_GREEN="$(tput setaf 2)"
_BR_GREEN="$(tput bold)${_GREEN}"
_RESET="$(tput sgr0)"
function __prompt_status() {
if [[ "$1" -ne 0 ]]; then
echo -n "${_BR_RED}$1${_RESET}"
else
echo -n "${_BR_GREEN}$1${_RESET}"
fi
}
PS0="\t\n" # display time in HH:MM:SS format
PS1="\n[\u@\h:\$PWD \$(__prompt_status \$?)]\$ "
PS1="\n[\u@\h:\$PWD \$?]\$ "
export PS0 PS1
# zoxide setup