Replies: 4 comments 2 replies
-
I can definitely see why that would be useful! It's also probably hard to implement. Related: sharkdp/fd#638 |
Beta Was this translation helpful? Give feedback.
-
I totally agree, IMHO the problem is on the roof of the implementation of regular expressions, which are completely lacking in this very concept. Using
would match correctly So
could make a poor |
Beta Was this translation helpful? Give feedback.
-
One potential idea would be to use https://github.com/laurikari/tre ( $ echo corazón | agrep -0 'corazon' # Exact match
$ echo corazón | agrep -1 'corazon' # Approximate match, within 1 edit
corazón It could be something like: $ bfs -aregex 1 '.*/corazon'
./corazon
./corazón |
Beta Was this translation helpful? Give feedback.
-
It is a great approach! It also returns different letters as good but, it is a good compromise.
$ echo corazén | agrep -1 'corazon'
corazén
The only (heuristic) solution I see based on what I have found (iconv, uregex <https://www.unicode.org/reports/tr18/#character_ranges>, equivalent non-accented chars <https://www.drillio.com/en/2011/java-remove-accent-diacritic/>, another <https://stackoverflow.com/questions/249087/how-do-i-remove-diacritics-accents-from-a-string-in-net>) is the heuristic list like the next into account when using this -uregex
[
{ "äæǽ", "ae" },
{ "öœ", "oe" },
{ "ü", "ue" },
...
|
Beta Was this translation helpful? Give feedback.
-
I love
bfs
and I using it since I met it, and telling others to do so. The only thing I really miss, and I sometimes resort to Spotlight terminal search, much much slower and more difficult to control, is when I want to ignore accented chars. That is, whenmecánica.pdf
is there but you don't know if it has the accent or not, sowould fail. I miss
-iuregex
Beta Was this translation helpful? Give feedback.
All reactions