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

Better detection of history builtin.

parent 74aebbf9
No related branches found
No related tags found
No related merge requests found
......@@ -241,7 +241,7 @@ __prerun () {
__prompt () {
local exitstatus="$?"
local runduration prompt
! type history > /dev/null 2> /dev/null || history -a
! [ "$(type history 2> /dev/null)" = "history is a shell builtin" ] || history -a
prompt=""
[ ! -f "$HOME/.prerun.$$" ] || runduration="$(__run_duration)"
[ "${runduration:-0}" -lt "10" ] || prompt="$(cyan -n "[Run duration: $runduration]") $prompt"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment