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

Case-insensitive history search #490

Closed
tailhook opened this issue Feb 18, 2021 · 5 comments
Closed

Case-insensitive history search #490

tailhook opened this issue Feb 18, 2021 · 5 comments

Comments

@tailhook
Copy link
Contributor

I'd like to have case-insensitive search of the history. And it looks like history search is hardcoded now. How should I approach the problem:

  1. Allow customizing history search?
  2. Add case_insensitive (or similar) config parameter?
  3. Make case insensitive default (if that makes more sense)?
@gwenn
Copy link
Collaborator

gwenn commented Feb 18, 2021

If possible we should behave like readline which seems to be case-sensitive.
So (2) seems good to me.
I will try to see how other libraries behave by default.

@gwenn
Copy link
Collaborator

gwenn commented Jul 14, 2021

It seems that we need the regex crate (rust-lang/rfcs#1988).
And we cannot use std::str::pattern (yet): https://docs.rs/regex/1.1.0/regex/struct.Regex.html#using-the-stdstrpattern-methods-with-regex

@gwenn
Copy link
Collaborator

gwenn commented Jul 14, 2021

See #546 but you may not like the cargo feature...

@tailhook
Copy link
Contributor Author

I'm fine with it being cargo feature. I think that case-insensitive here is what users would expect, and it's fine that it's a feature because of having an extra dependency.

@gwenn
Copy link
Collaborator

gwenn commented Aug 17, 2021

Version 9.0.0 released.

@gwenn gwenn closed this as completed Aug 17, 2021
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

2 participants