You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The where command is case sensitive both for column names and values. Could there be a way to make it ignore case, especially in column names? I find that when working with generated data, column names often come out in all caps, so the filtering needs to use all caps too, which, while no big deal, is a little annoying.
Would it be an idea to have a flag to make the command case insensitive? I'm thinking primarily about the column names, though the values could also be matched case insensitively.
This might cause issues if you have two columns names that only differ in casing, though, so I don't know whether that's doable or desirable.
Reacted by Edward DeVries, Aaron Bockelie and Diana
I have mixed feelings. Mostly because data sources, with the exception of something like Windows filenames, are all going to be case sensitive for fields.
That said, it might make sense to have a relaxed mode, or to at least have a forgiving autocomplete, when we add that.
Yeah, I can see your point about data sources often being case sensitive. That said, SQL tends to be insensitive, doesn't it? I don't think it should be the default, but a relaxed mode / ignore-case flag could be a good idea.
The forgiving auto-complete might also be enough. Fish shell does this for paths on case sensitive file systems and that works great.
I believe that Nu really needs to allow the user to query for an insensitive case, similar as we can do with grep -i.
A typical example would be to look for some file or process id, when you don't know exactly how that process is called or spelled (is it written in uppercase, lowercase, camelCase?), i.e.:
This issue has been marked stale for more than 10 days without activity. Closing this issue, but if you find that the issue is still valid, please reopen.
It, will, you’re not wrong, but, and you can argue it’s a silly argument, it doesn’t feel like the Nushell way. Some other programs would probably have a --flag, which also feels weird here.
I was trying to come up with something that would feel natural here. Just a suggestion though.
Activity
sophiajt commentedon Oct 19, 2019
I have mixed feelings. Mostly because data sources, with the exception of something like Windows filenames, are all going to be case sensitive for fields.
That said, it might make sense to have a relaxed mode, or to at least have a forgiving autocomplete, when we add that.
thomasheartman commentedon Oct 24, 2019
Yeah, I can see your point about data sources often being case sensitive. That said, SQL tends to be insensitive, doesn't it? I don't think it should be the default, but a relaxed mode / ignore-case flag could be a good idea.
The forgiving auto-complete might also be enough. Fish shell does this for paths on case sensitive file systems and that works great.
cig0 commentedon May 1, 2020
Hi all,
I believe that Nu really needs to allow the user to query for an insensitive case, similar as we can do with
grep -i.A typical example would be to look for some file or process id, when you don't know exactly how that process is called or spelled (is it written in uppercase, lowercase, camelCase?), i.e.:
Thanks
thegedge commentedon May 2, 2020
We'll need to think about the syntax for a simplified version of this, but here's an example of what you can do for now:
Of course, if you care about the case for the end result, there's not really an option right now (or nothing I can think of).
github-actions commentedon Jun 24, 2021
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
github-actions commentedon Jul 7, 2021
This issue has been marked stale for more than 10 days without activity. Closing this issue, but if you find that the issue is still valid, please reopen.
Port exec command (nushell#849)
Port exec command (#849)
Release notes for nushell `0.78` (nushell#830)
youk commentedon Jul 3, 2024
AFAIU, the issue is still valid. There are only workarounds such as using intermediate
str. Could you please reopen it?onsamyj commentedon Dec 21, 2024
Can we have something like
{some data} | ignore-case | where name like catthat would returncat,Cat,CAT, etc?Nushell is about data. Nushell is about pipes. That makes sense to me.
tim-mccarthy commentedon Dec 21, 2024
where name =~ "(?i)^cat$"would get the desired effect.onsamyj commentedon Dec 21, 2024
It, will, you’re not wrong, but, and you can argue it’s a silly argument, it doesn’t feel like the Nushell way. Some other programs would probably have a
--flag, which also feels weird here.I was trying to come up with something that would feel natural here. Just a suggestion though.
feat!: Explicit cell-path case sensitivity syntax (#15692)