ohmybash / oh-my-bash

A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
https://ohmybash.github.io
MIT License
5.86k stars 651 forks source link

Removing redundant HISTIGNORE patterns #427

Closed The-Judge closed 1 year ago

The-Judge commented 1 year ago

OMB currently sets in lib/history.sh:

# Avoid duplicate entries
HISTCONTROL="erasedups:ignoreboth"

# Don't record some commands
export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear"

According to official GNU bash manual, having &:[ ]* in HISTIGNORE provides the functionality of ignoreboth. Thus, having both provides redundant results but makes the config harder to understand.

akinomyoga commented 1 year ago

Thanks! All of the three PRs are good ones.