From 38a9f6595af56e85c6c36670809d3bcfa4629753 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 13 Apr 2022 17:08:12 -0500 Subject: Change prompt --- bash/prompt.bash | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bash/prompt.bash b/bash/prompt.bash index df30c82..dfb84ca 100644 --- a/bash/prompt.bash +++ b/bash/prompt.bash @@ -4,22 +4,22 @@ PS1= # user, host, and cwd PROMPT_DIRTRIM=3 # how many dirs above current to print (rest are '...') -PS1+='\[\e[36m\]\u@\h \w' +PS1+='\[\e[0;46m\]\u@\h \w' # git bit # see https://unix.stackexchange.com/questions/278206 possible_git_prompt_locations=( - /usr/share/git/git-prompt.sh # Arch, etc. (default?) - /usr/lib/git-core/git-sh-prompt # Debian, Ubuntu ... - /usr/share/git-core/contrib/completion/git-prompt.sh # Fedora ?? + /usr/share/git/git-prompt.sh # Arch, etc. (default?) + /usr/lib/git-core/git-sh-prompt # Debian, Ubuntu ... + /usr/share/git-core/contrib/completion/git-prompt.sh # Fedora ?? ) for file in "${possible_git_prompt_locations[@]}"; do - if [[ -f "$file" ]]; then - source "$file" && - PS1+='\[\e[35m\]$(__git_ps1)' - break - fi + if [[ -f "$file" ]]; then + source "$file" && + PS1+='\[\e[35m\]$(__git_ps1)' + break + fi done # newline @@ -27,9 +27,9 @@ PS1+='\[\e[0m\]\n' # exit code (only if error) __prompt_exit_code() { - local ec=$? - (( $ec > 0 )) && - printf "$ec" + local ec=$? + (( $ec > 0 )) && + printf "$ec" } PS1+='\[\e[31m\]$(__prompt_exit_code)\[\e[0m\]' -- cgit 1.4.1-21-gabe81