I'm a big fan of saving history - trying to remember all the shell based commands we use is a nightmare! If you're using zsh, a tip I picked up from [0] was to alias all your common commands like 'cd', 'ls' 'fg'... to: ' cd' ' ls' ' fg' ... Then add the following line to your zshrc to ignore lines prepended with a space: setopt HIST_IGNORE_SPACE This keeps your history cleaner from any ls, cd, fg inputs you use. [0]…
It would be really clever if a series of cd/ls rolled into a final absolute path cd so history shows context for the subsequent batch of commands.