added command history number and exit code

This commit is contained in:
tavo-wasd 2023-09-10 22:32:48 -06:00
parent a7f9531980
commit 5a4c723340

View file

@ -8,7 +8,7 @@ prompt_git_branch() {
GIT_BRANCH="$(git branch 2>/dev/null | grep '*' | cut -d ' ' -f 2)"
[ -n "$GIT_BRANCH" ] && printf "  %s " "$GIT_BRANCH"
}
PS1='\[\033[1m\]\[\033[46m\] \u@\h \[\033[44m\] \w \[\033[45m\]$(prompt_git_branch)\[\033[0m\] \[\033[2m\]\@\n⯈ \[\033[0m\]'
PS1='\[\033[2m\]($?) \[\033[1m\]\[\033[46m\] \u@\h \[\033[44m\] \w \[\033[45m\]$(prompt_git_branch)\[\033[0m\] \[\033[2m\][\!] \@\n⯈ \[\033[0m\]'
PROMPT_COMMAND="echo" # Line jump after every command
# General configs