> It's something I strongly recommend: store off-used CLI calls in your notes/personal wiki.
All of my bash commands from any terminal get piped into a separate, unified history file, copying some setup I read about in a blog a long time ago. It's an easy, dumb setup that just works. I've been using it for years without any performance problems, and if I ever get any, I can just archive the current text file and start over with a fresh one.
Having access to past commands is really handy and has saved my butt multiple times.
$(history 1) =~ ^\ *[0-9]+\ +([^\ ]+\ [^\ ]+)\ +(.*)$
if [ "$command_part" != "$PERSISTENT_HISTORY_LAST" ]
echo $date_part "|" "$command_part" >> ~/.persistent_history
# Stuff to do on PROMPT_COMMAND
HISTTIMEFORMAT="%d/%m/%y %T "
alias phgrep='cat ~/.persistent_history|grep --color'
alias hgrep='history|grep --color'
My instinct says that if you'd run into any problems, it would be with this line: