# 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
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"