Hacker News new | ask | show | jobs
by Rediscover 374 days ago
Two prehensile thumbs up - your HISTCONTROL or

HISTIGNORE='m:??:info STARHERE:info:[bf]g:exit:[bf]g %[0-9]:help STARHERE:date:cal:cal ????:exec env ENV\STARHERE' (replace STARHERE with an asterisk)

generally works for me in bash(1).

2 comments

Oh crazy, I didn’t know about this aspect of bash.

The line above set up automatic history ignoring for the colon-delimited shell globs; eg

fg %3

won’t be recorded to shell history, since it’s matched by one of the globs.

  HISTIGNORE='m:??:info *:info:[bf]g:exit:[bf]g %[0-9]:help *:date:cal:cal ????:exec env ENV\*'
Thanks for the formatted/expanded:) repost!