natecraddock / zf

a commandline fuzzy finder and zig package designed for filtering filepaths
MIT License
453 stars 14 forks source link

breaks on control sequences in folder/file name #4

Closed matu3ba closed 1 year ago

matu3ba commented 2 years ago

Reproduce with:

git clone https://github.com/matu3ba/chepa/tree/cdbc5cc3574aa38f7604a77d57745f854d8ef783
cd chepa
zig build tfgen
cd test_folders && rm -fr base_perf && rm -fr control_sequences
cd control_sequences
fd -t f | zf

output:

>
./f_
./f_
./f_
./f_
./f_
./f_
./f_
./f_
./f_
./f_

Picture related breaks_on_control_sequences

matu3ba commented 2 years ago

Either 1. check this with a perf/complexity cost or 2. document the behavior

natecraddock commented 2 years ago

Hi! Sorry I haven't had the time to look into this yet. It's on my todo list for this week, thank you for the reminder!

natecraddock commented 1 year ago

As I mentioned in the other issue, sorry for not getting to this for nearly a year! I appreciate your checking that zf handles crazy cases.

I think this is a case where zf just won't be bothered to handle the unusual excape characters. I don't think many people would even consider this to be a use case. I'll document this and then close the issue.

natecraddock commented 1 year ago

Actually, I think this issue serves as good enough documentation. If many people come asking, I'll update the readme.