|
|
|
|
|
by yomly
3671 days ago
|
|
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] http://chneukirchen.org/blog/archive/2012/02/10-new-zsh-tric... EDIT: formatting |
|
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.