Android-ConvenientBanner icon indicating copy to clipboard operation
Android-ConvenientBanner copied to clipboard

Clean up the `HISTIGNORE` Bash variable

Open xty opened this issue 1 year ago • 0 comments

The following passage from the Bash Reference Manual provides justification for the proposed changes:

HISTIGNORE subsumes the function of HISTCONTROL. A pattern of ‘&’ is identical to ignoredups, and a pattern of ‘[ ]*’ is identical to ignorespace. Combining these two patterns, separating them with a colon, provides the functionality of ignoreboth.

The relevant section as it stands: https://github.com/paulirish/dotfiles/blob/89368927c21c6af97d0d604a5433479ec82bda80/.bash_profile#L57-L63

Specifically, this PR is aimed at ironing out these kinks:

  1. Having both & in HISTIGNORE and ignoredups in HISTCONTROL is redundant.
  2. Assuming the intention was to preserve commands with a leading space (as indicated by the comment in Line 57), the inclusion of [ ]* in HISTIGNORE would be self-defeating.

xty avatar Mar 04 '23 23:03 xty