From 521780f6846b4235289e84fd173a31a2cb23dab9 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 25 Aug 2018 00:29:46 +0300 Subject: [PATCH] Better detection of history builtin. --- .bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 9693be0..781a730 100644 --- a/.bashrc +++ b/.bashrc @@ -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" -- GitLab