Resources
- The classic programmable completion
- Cheatsheet for the vi command mode (enabled with
set -o vi
) - Daily history files, from which I got the following snippet:
export HISTFILE=~/.history/`date +%Y%m%d`.hist
if [[ ! -e $HISTFILE ]]; then
LASTHIST=~/.history/`ls -tr ~/.history/ | tail -1`
if [[ -e $LASTHIST ]]; then
tail -50 $LASTHIST > $HISTFILE
# Write a divider to identify where the prior day's session history ends
echo "##########################################################" >> $HISTFILE
fi
fi
export HISTSIZE=100000