-
Notifications
You must be signed in to change notification settings - Fork 93
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
Check to make sure History is enabled. #10
Comments
See also: my bulletproof history collector :) |
What about if HISTCONTROL or HISTTIMEFORMAT is already set and a user has scripts that need those already set settings? I didn't see anything in the README that says it will overwrite user defined settings. I just found this repo and didn't look closely enough if it will check before overwriting but I don't think it checks. |
I vote very much against automatically and silently changing user settings. If a condition can't be worked around, then warn loudly before tweaking. @rcaloras, is the purpose of the history check specifically just to make sure preexec runs once-per-interactive-line (rather than DEBUG per simple command)? |
I answered my own question by re-rereading and I have a separate PR open, so please disregard my comments here. |
Several history features should be checked or enabled to make sure bash-preexec can operate correctly.
One example is simply making sure history is turned on.
Quoted by @evverx on #6 :
@rcaloras , thanks.
Could probably add a few more checks to make sure history is properly enabled
Too many checks:
history on
,HISTSIZE
,history-size
in~/.inputrc
...I vote for auto enabling:)
I've collected some useful settings:
The text was updated successfully, but these errors were encountered: