Comment

Comment by yomly

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

parent yomly 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton