Fix history in none-home directories

This commit is contained in:
Felix Van der Jeugt 2019-10-29 19:41:40 +01:00
parent d72155cd86
commit 332cb2e5c0
No known key found for this signature in database
GPG Key ID: 58B209295023754D

4
yashrc
View File

@ -14,8 +14,8 @@ fi
HISTFILE= HISTFILE=
HISTSIZE=5000 HISTSIZE=5000
HISTRMDUP=5000 HISTRMDUP=5000
history -r .yash_history history -r "$HOME/.yash_history"
trap 'h=$(mktemp) && history -w $h && history -c && history -r .yash_history && history -r $h && history -w .yash_history && rm $h' EXIT trap 'h=$(mktemp) && history -w $h && history -c && history -r "$HOME/.yash_history" && history -r $h && history -w $HOME/.yash_history && rm $h' EXIT
# Get ourselves a nice prompt # Get ourselves a nice prompt
ks() { s="$?" ; $* ; return "$s" ; } ks() { s="$?" ; $* ; return "$s" ; }