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

Make rlwrap honour bash HISTIGNORE and HISTCONTROL options #26

Open
hanslub42 opened this issue Dec 28, 2014 · 0 comments
Open

Make rlwrap honour bash HISTIGNORE and HISTCONTROL options #26

hanslub42 opened this issue Dec 28, 2014 · 0 comments

Comments

@hanslub42
Copy link
Owner

bash users can set options HISTIGNORE and HISTCONTROL to specify when a command should not be put in the history list. rlwrap has options --forget-matching and --history-no-dupes that do the same thing, but in a slightly more complicated way.

For example, a bash user can specify HISTCONTROL=ignoredups:ignorespace, where rlwrap needs options --forget-matching='^ ' --history-no-dupes=1 to achieve the same.

As the machinery for ignoring duplicates and forgetting input is already there, it should not be too difficult to make rlwrap consult the environment (into which the bash options then have to be exported, of course) to mimic the desired bash behaviour.

zsh users (like myself) can just set the environment variables as in bash, even if zsh uses a different set of options

All this is minimally intrusive: those who don't want this can just refrain from exporting the options into the environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant