3 ms·
> - you get a new shell, so your history is lost To prevent that from happening you can add this to your .bashrc #write to history file at each shell prom
by UI_at_80x24 4y ago
> - you get a new shell, so your history is lost
To prevent that from happening you can add this to your .bashrc
#write to history file at each shell prompt
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
- cerved 4y agoNote that this can slow down your shell. Also it mingles histories from different sessions. Stop doing this myself for these reasons
- UI_at_80x24 4y agoYes, these are good points but I've found the benefit outweighs the annoyance. fzf for a history searcher really helps. BUT not being able to 'up arrow' the previous command is annoying at times. So far it's a 6/10 Slightly better then not doing it. =)