-
-
Notifications
You must be signed in to change notification settings - Fork 843
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
character-equivalents flag #638
Comments
I made a list of the classes here: https://github.com/chapmanjacobd/posix-equiv-char-class made by brute-forcing it like this: for((i=0; i < 0x110000; i++)) { printf "\U$(printf "%x" $i)\n"; } | grep -a '^[[=a=]]$' | sponge a & |
maybe this helps?
we should probably separate the capital letter mappings because that is handled with a separate flag |
upper and lower:
(smart-case would use both mappings) |
maybe this is actually a bad idea. it is really slow to search everything... :/
I think for my case since I only have 5GB of data I will just use a special copy to search files...
using unwrap.pl |
You can also use normal regex mode and replace the non-ascii char with fd -i 'san jos\w' or the unicode "letter" class: fd -i 'san jos\p{Letter}'
fd -i 'san jos\pL' which would not match numbers, for example. |
wouldn't |
Yes. That would also work, right. 👍 |
I asked exactly this on askubuntu, and then fd don't have and won't have this feature? Or I should file a new issue? |
Sounds like a good feature to have. An issue would be good |
I'd like to ignore diacritics when searching. For example:
$ fd -tf -i 'san jose' wikivoyage/San Jose (California).txt wikivoyage/San Jose (Camarines Sur).txt wikivoyage/San Jose (Palawan).txt wikivoyage/San Jose.txt
With POSIX style brackets we should be able to do this:
but, while that feature would allow more precise queries, I think something more generic would be widely used:
I guess for now what I can do is just replace non-ascii char with
*
and do a glob but it is not quite the same..The text was updated successfully, but these errors were encountered: