broot icon indicating copy to clipboard operation
broot copied to clipboard

configurable separators for query parts and verbs | use space instead of comma in token search

Open balta2ar opened this issue 3 years ago • 3 comments

Did a discussion occur before? No or not sure.

Is your feature request related to a problem? Please describe. I'm trying to use broot to quickly jump to directories in my file tree. My favorite search mode is <empty>: tokens path because it's very natural for me to filter by several path components, e.g. I'd like a query "chirpy src" to yield the directory /home/username/dev/company/repository/src/chirpy (assuming cwd=/home/username/dev/company).

The problem is that in "tokens" search mode I have to use comma as separators, e.g. "chirpy,src", which is not very natural for me.

Describe the solution you'd like It would be great if I could configure separators so that I could type "chirpy src" instead of "chirpy,src". I don't really use verbs functionality, but if I did, maybe a different separator could be assigned to indicate a beginning of a verb.

Describe alternatives you've considered I read https://dystroy.org/broot/input/#subtleties but couldn't find the solution there.

balta2ar avatar Jun 18 '21 08:06 balta2ar

@Canop friendly bump. could this be a low-hanging fruit?

balta2ar avatar Jan 06 '23 15:01 balta2ar

Hum. Maybe. I think I missed this issue. But I don't think a space might be acceptable here, maybe a slash.

BTW I'm not sure of the real value of the tokens path search. I usually just do chirpy&src, like this: image

Canop avatar Jan 06 '23 15:01 Canop

If you get around to implementing this, please allow using space or have it configurable, it's literally the best option for me, and that's the whole reason I made this request in the first place. I use space in fzf and plocate, and they work exactly how I want -- basically the query becomes .*chirpy.*src.*, just ignoring the order of the words. Over the many years I came to understanding that I don't like fuzzy search, so a simple "token path search" seem to live up best to my expectations. Another reason why space is important is that I'd like all my tools to understand it in the same way, so I don't have to remember a specific separator for every tool.

balta2ar avatar Jan 07 '23 19:01 balta2ar