Skip to content
Snippets Groups Projects
Commit 88f96fbc authored by nimrod's avatar nimrod
Browse files

Revert "Show last error code in Bash prompt."

This reverts commit 10852777.
parent 10852777
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ export LANG=en_US.UTF8 ...@@ -6,6 +6,7 @@ export LANG=en_US.UTF8
export HISTCONTROL=ignoreboth:erasedups export HISTCONTROL=ignoreboth:erasedups
export HISTSIZE=100000 export HISTSIZE=100000
export HISTFILESIZE=100000 export HISTFILESIZE=100000
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
if [ -n "${BASH:-}" ] if [ -n "${BASH:-}" ]
then then
shopt -s histappend shopt -s histappend
...@@ -23,8 +24,6 @@ then ...@@ -23,8 +24,6 @@ then
# shellcheck disable=SC2015 # shellcheck disable=SC2015
which aws_completer >/dev/null && complete -C 'aws_completer' aws || which aws_completer >/dev/null && complete -C 'aws_completer' aws ||
true true
export PROMPT_COMMAND="__bash_prompt"
fi fi
# make less more friendly for non-text input files, see lesspipe(1) # make less more friendly for non-text input files, see lesspipe(1)
...@@ -189,16 +188,5 @@ match_ssl_pair () { ...@@ -189,16 +188,5 @@ match_ssl_pair () {
return "$exitcode" return "$exitcode"
} }
__bash_prompt () {
local exitcode="$?"
history -a
if [ "$exitcode" -eq 0 ]
then
export PS1="\033[0m[Exit code: $exitcode] \u@\h:\w\$ "
else
export PS1="\033[0m[\033[31mExit code: $exitcode\033[0m] \u@\h:\w\$ "
fi
}
# shellcheck disable=SC1090 # shellcheck disable=SC1090
. "$HOME/Documents/Shore/bundle_certs/bundle_certs" . "$HOME/Documents/Shore/bundle_certs/bundle_certs"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment