Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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).



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!




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: