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

Better detection of history builtin.

parent 74aebbf9
Branches
No related tags found
No related merge requests found
...@@ -241,7 +241,7 @@ __prerun () { ...@@ -241,7 +241,7 @@ __prerun () {
__prompt () { __prompt () {
local exitstatus="$?" local exitstatus="$?"
local runduration prompt 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="" prompt=""
[ ! -f "$HOME/.prerun.$$" ] || runduration="$(__run_duration)" [ ! -f "$HOME/.prerun.$$" ] || runduration="$(__run_duration)"
[ "${runduration:-0}" -lt "10" ] || prompt="$(cyan -n "[Run duration: $runduration]") $prompt" [ "${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