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

friendly history searching should be case insensitive #3236

Closed
krader1961 opened this Issue Jul 15, 2016 · 12 comments

Comments

Projects
None yet
5 participants
@krader1961
Contributor

krader1961 commented Jul 15, 2016

Working on fixing issue #3224 caused me to notice that searching history is case sensitive. So history --search wtf is not the same as history --search WTF. Not very friendly, IMHO. I propose changing the default to case insensitive searching with an option for case sensitive.

Whatever we decide the man page should be updated to document the behavior as it is currently silent on the matter.

@krader1961 krader1961 added this to the fish-future milestone Jul 15, 2016

@krader1961 krader1961 self-assigned this Jul 15, 2016

@krader1961 krader1961 modified the milestones: fish 2.4.0, fish-future Sep 10, 2016

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Sep 10, 2016

Contributor

Moving to the 2.4.0 target. I've started work on it and should be done in a few days.

Contributor

krader1961 commented Sep 10, 2016

Moving to the 2.4.0 target. I've started work on it and should be done in a few days.

@krader1961 krader1961 modified the milestones: fish-future, fish 2.4.0 Sep 18, 2016

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Sep 18, 2016

Contributor

Removing this from the fish 2.4.0 milestone since my work to change how history subcommands are handled took priority. It seems very unlikely that change will be merged in time for me to complete working on this in time for the 2.4.0 release.

Contributor

krader1961 commented Sep 18, 2016

Removing this from the fish 2.4.0 milestone since my work to change how history subcommands are handled took priority. It seems very unlikely that change will be merged in time for me to complete working on this in time for the 2.4.0 release.

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Sep 26, 2016

Contributor

I've made more progress on implementing this. It might be possible to implement it in time for the 2.4.0 release but for the fact I have decided to try and see if I can get to root cause for issue #3050 since we've received yet another report of that problem (issue #3406) and I can now reliably reproduce that problem and it does appear to involve the change I made (commit f2246df) to reduce the number of unicode private-use chars that fish reserves.

Contributor

krader1961 commented Sep 26, 2016

I've made more progress on implementing this. It might be possible to implement it in time for the 2.4.0 release but for the fact I have decided to try and see if I can get to root cause for issue #3050 since we've received yet another report of that problem (issue #3406) and I can now reliably reproduce that problem and it does appear to involve the change I made (commit f2246df) to reduce the number of unicode private-use chars that fish reserves.

@zanchey

This comment has been minimized.

Show comment
Hide comment
@zanchey

zanchey Oct 2, 2016

Member

@krader1961, is this likely to be fixable in the next 48 hours? I am happy to bump it for now.

Member

zanchey commented Oct 2, 2016

@krader1961, is this likely to be fixable in the next 48 hours? I am happy to bump it for now.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Oct 2, 2016

Member

Just noticed this. This seems strange - isn't Unix mostly case-insensitive, so commands that differ only by case aren't related? What's an example of a scenario where you'd want this to be case-insensitive?

Member

ridiculousfish commented Oct 2, 2016

Just noticed this. This seems strange - isn't Unix mostly case-insensitive, so commands that differ only by case aren't related? What's an example of a scenario where you'd want this to be case-insensitive?

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Oct 2, 2016

Contributor

is this likely to be fixable in the next 48 hours?

Maybe, but not with unit tests. I've been exploring different approaches and have one that I'm happy with that seems to work well for me. To be determined is whether I've introduced any problems such as memory leaks or performance problems.

Just noticed this. This seems strange - isn't Unix mostly case-insensitive, so commands that differ only by case aren't related?

Traditional UNIX is case-sensitive for almost everything. It is modern variants such as macOS (Mac OS X) that are case-insensitive; at least with respect to file system path names.

Contributor

krader1961 commented Oct 2, 2016

is this likely to be fixable in the next 48 hours?

Maybe, but not with unit tests. I've been exploring different approaches and have one that I'm happy with that seems to work well for me. To be determined is whether I've introduced any problems such as memory leaks or performance problems.

Just noticed this. This seems strange - isn't Unix mostly case-insensitive, so commands that differ only by case aren't related?

Traditional UNIX is case-sensitive for almost everything. It is modern variants such as macOS (Mac OS X) that are case-insensitive; at least with respect to file system path names.

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Oct 2, 2016

Contributor

What's an example of a scenario where you'd want this to be case-insensitive?

Every single history search. When you use Google or some other search engine how often do you, or anyone else, expect the result to be case-sensitive? Yes, I am a grey beard who used to expect such searches to be case-sensitive. But today the reality is that most users expect case-insensitive behavior.

Contributor

krader1961 commented Oct 2, 2016

What's an example of a scenario where you'd want this to be case-insensitive?

Every single history search. When you use Google or some other search engine how often do you, or anyone else, expect the result to be case-sensitive? Yes, I am a grey beard who used to expect such searches to be case-sensitive. But today the reality is that most users expect case-insensitive behavior.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Oct 2, 2016

Member

(Sorry, I got mixed up. What I wrote should have read "isn't Unix mostly case-sensitive?")

Your observation about Google is well taken, but I would guess that most users still expect the default to be case-sensitive. This would match grep, etc.

Member

ridiculousfish commented Oct 2, 2016

(Sorry, I got mixed up. What I wrote should have read "isn't Unix mostly case-sensitive?")

Your observation about Google is well taken, but I would guess that most users still expect the default to be case-sensitive. This would match grep, etc.

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Oct 2, 2016

Contributor

It's not obvious that people using the grep command without the -i or --ignore-case options is applicable to this situation. It seems to me, given fish's mission as a "friendly" shell, that most users will expect implicit matches to be case insensitive so as to match their experience with search engines like Google and Yahoo. As a grey-beard who has been using computers since the mid 1970's I sometimes find the current behavior of many applications surprising (e.g., case-insensitive without my explicit say so). But I recognize that my expectations are irrelevant.

Contributor

krader1961 commented Oct 2, 2016

It's not obvious that people using the grep command without the -i or --ignore-case options is applicable to this situation. It seems to me, given fish's mission as a "friendly" shell, that most users will expect implicit matches to be case insensitive so as to match their experience with search engines like Google and Yahoo. As a grey-beard who has been using computers since the mid 1970's I sometimes find the current behavior of many applications surprising (e.g., case-insensitive without my explicit say so). But I recognize that my expectations are irrelevant.

@floam

This comment has been minimized.

Show comment
Hide comment
@floam

floam Oct 2, 2016

Member

It is modern variants such as macOS (Mac OS X) that are case-insensitive; at least with respect to file system path names.

Though, what the future may hold: APFS appears to be case insensitive (for now? a bug? Hard to tell.)

Member

floam commented Oct 2, 2016

It is modern variants such as macOS (Mac OS X) that are case-insensitive; at least with respect to file system path names.

Though, what the future may hold: APFS appears to be case insensitive (for now? a bug? Hard to tell.)

@alphapapa

This comment has been minimized.

Show comment
Hide comment
@alphapapa

alphapapa Oct 3, 2016

My two cents: I prefer case-sensitive filesystems by far. However, for searching history entries, I think case-insensitive-by-default would be more useful. If you're trying to remember a command that acted on a certain path that you don't access frequently, you might not remember whether it has uppercase letters. And why require users to do history | grep -i when the history already has search built-in?

Some of the newer searching/grepping tools are case-insensitive by default, but switch to case-sensitive if uppercase letters are used in the query. That might be a good model for Fish.

alphapapa commented Oct 3, 2016

My two cents: I prefer case-sensitive filesystems by far. However, for searching history entries, I think case-insensitive-by-default would be more useful. If you're trying to remember a command that acted on a certain path that you don't access frequently, you might not remember whether it has uppercase letters. And why require users to do history | grep -i when the history already has search built-in?

Some of the newer searching/grepping tools are case-insensitive by default, but switch to case-sensitive if uppercase letters are used in the query. That might be a good model for Fish.

krader1961 added a commit to krader1961/fish-shell that referenced this issue Oct 11, 2016

@krader1961 krader1961 modified the milestones: fish 2.4.0, fish-future Oct 11, 2016

krader1961 added a commit to krader1961/fish-shell that referenced this issue Oct 15, 2016

krader1961 added a commit to krader1961/fish-shell that referenced this issue Oct 15, 2016

krader1961 added a commit to krader1961/fish-shell that referenced this issue Oct 16, 2016

krader1961 added a commit to krader1961/fish-shell that referenced this issue Oct 17, 2016

krader1961 added a commit to krader1961/fish-shell that referenced this issue Oct 17, 2016

@krader1961 krader1961 closed this in #3460 Oct 17, 2016

@zanchey zanchey modified the milestones: fish 2.4.0, fish-future Oct 17, 2016

@alphapapa

This comment has been minimized.

Show comment
Hide comment
@alphapapa

alphapapa Oct 20, 2016

Thanks Kurtis!

alphapapa commented Oct 20, 2016

Thanks Kurtis!

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