Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

kmcfate
Copy link
Contributor

@kmcfate kmcfate commented Nov 22, 2023

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: #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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

Copy link
Member

@cornfeedhobo cornfeedhobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR needs a lot more justification and explanation.

@kmcfate
Copy link
Contributor Author

kmcfate commented Nov 23, 2023

The default behavior also conflicts with explicit HISTORY_AUTOSAVE for themes making it ineffectual as it does not take into account 'autoshare' option. 5d58580 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 #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
Copy link
Contributor Author

kmcfate commented Nov 23, 2023

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

@kmcfate
Copy link
Contributor Author

kmcfate commented Nov 24, 2023

Workaround is adding 'noauto' to HISTCONTROL.

@kmcfate kmcfate closed this Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: .bash_it/lib/history.bash reuses HISTCONTROL for it's own incorrect purposes by default
2 participants