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

- Clear exit status from Bash' prompt after it's been shown.

parent 095b88b5
No related branches found
No related tags found
No related merge requests found
......@@ -207,9 +207,10 @@ __prompt () {
#red="\033[31;1m"
#yellow="\033[33;1m"
prompt=""
[ "$exitstatus" = "0" ] || prompt="[Exit status: $exitstatus] $prompt"
[ ! -f "$HOME/.prerun.$$" ] || runduration="$(__run_duration)"
[ "${runduration:-0}" -lt "10" ] || prompt="[Run duration: $runduration] $prompt"
[ -n "${runduration:-}" ] || exitstatus='0'
[ "$exitstatus" = "0" ] || prompt="[Exit status: $exitstatus] $prompt"
echo "$prompt"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment