4 ms·
Do you have an alias or something else that facilitates that, or do you just do it manually?
by tedks 10y ago
Do you have an alias or something else that facilitates that, or do you just do it manually?
- ag_47 10y agoNever bothered to fully automate it, tbh. I use `unset HISTFILE` to make sure when I exit the history file doesn't get all the cruft in. Every now and then I might do some housecleaning, including going through the history file then `cp ~/.bash_history{,.2}` to keep a clean copy around. As far as saving, heres a handy function: `getlast() { fc -ln "$1" "$1" | sed '1s/^[[:space:]]*//' }`