Bash-it / bash-it

A community Bash framework.
MIT License
14.14k stars 2.29k forks source link

Update default behvaiour for _bash-it-history-auto-save to do nothing #2233

Closed kmcfate closed 7 months ago

kmcfate commented 7 months ago

Description

Current behavior of modifying history if histappend is enables (mcfly enables histappend) breaks mcfly. This change makes the default behavior nothing, as expected. The use of custom HISTCONTROL values in bash-it is not documented anywhere.

Motivation and Context

Fixes: https://github.com/Bash-it/bash-it/issues/2232

How Has This Been Tested?

Tested locally by having mcfly installed and verifying it works. Also tested that setting HISTCONTROL to 'noauto' also fixed the problem.

Screenshots (if appropriate):

Types of changes

Checklist:

kmcfate commented 7 months ago

The default behavior also conflicts with explicit HISTORY_AUTOSAVE for themes making it ineffectual as it does not take into account 'autoshare' option. https://github.com/Bash-it/bash-it/commit/5d5858058ec61abefcfb122f90bd0eee3d8276f5 took this feature out of the optional bash history plugin and made it default behavior and doesn't even follow the documented behavior in the pull request https://github.com/Bash-it/bash-it/pull/1940. If it actually behaved as described in the pull request I would have no problem. All this change does it make it closer to the documented behavior, which is do nothing by default.

kmcfate commented 7 months ago

Since there is a workaround, I would also be fine with some documentation updates to avoid changing the default again.

kmcfate commented 7 months ago

Workaround is adding 'noauto' to HISTCONTROL.