X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=brc;h=118ce01e18e27f7654cae2805c4ef1d44ab9d672;hp=51a04dcac0d59c3a29bd081522ee11a51dc738da;hb=a1ebefe19ab910d20fad0c2fd88637fee23dee7c;hpb=7f759d320592e791a62cd0a966350e8c53ee0976 diff --git a/brc b/brc index 51a04dc..118ce01 100644 --- a/brc +++ b/brc @@ -888,7 +888,9 @@ q() { # start / launch a program in the backround and redir output to null # shellcheck disable=SC2120 r() { - history -a # save history + if [[ $HISTFILE ]]; then + history -a # save history + fi trap ERR # this avoids a segfault exit ${1:0} # i had this redir, not sure why @@ -1268,7 +1270,9 @@ if [[ $- == *i* ]]; then local ps_char ps_color unset IFS - history -a # save history + if [[ $HISTFILE ]]; then + history -a # save history + fi case $return in 0) ps_color="$term_purple"