From c48228e066633b790c33be74f2a48f1d57465de4 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Wed, 16 Oct 2019 14:47:43 +0200 Subject: [PATCH] Split yashrc history per instance --- yashrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yashrc b/yashrc index 1958506..4b38534 100644 --- a/yashrc +++ b/yashrc @@ -11,8 +11,11 @@ if command --identify --builtin-command bindkey >/dev/null; then fi # set history -HISTFILE=~/.yash_history +HISTFILE= HISTSIZE=5000 +HISTRMDUP=5000 +history -r .yash_history +trap 'h=$(mktemp) && history -w $h && history -c && history -r .yash_history && history -r $h && history -w .yash_history && rm $h' EXIT # Get ourselves a nice prompt ks() { s="$?" ; $* ; return "$s" ; }