broot icon indicating copy to clipboard operation
broot copied to clipboard

show only search results without tree structure, and sort results

Open evanescente-ondine opened this issue 3 years ago • 6 comments

I wish to emulate fzf selector behavior by showing only results, if possible only their basename, without the tree, sorting these results. It would make researching much more comfortbale, for those with complex trees and looong directory names !

Thanks for your work, it's the single best and best written piece of software I've come across, and God knows my exigences are sky high.

evanescente-ondine avatar Jan 31 '22 16:01 evanescente-ondine

Keeping the tree, can we show only the basename, without needlessly repeating the complete path for each file ?

evanescente-ondine avatar Feb 02 '22 14:02 evanescente-ondine

It depends on the search mode. The current default is a search on path. If you switch to a search on filename, the path isn't repeated. See https://dystroy.org/broot/conf_file/#search-modes

Try for example with

"search-modes": {
    <empty>: fuzzy name
    /: regex name
    z/: regex path
}

Canop avatar Feb 02 '22 14:02 Canop

I see, thanks. It would be great to toggle that behavior, regardless of the search mode. I do need to search on the path too, but that doesn't mean I want it to show.

evanescente-ondine avatar Feb 02 '22 14:02 evanescente-ondine

The reason it's shown is so that the matching chars are displayed.

Canop avatar Feb 02 '22 14:02 Canop

Because it's a research on full path, I got it ;-) But it would be useful to let the user decide anyway.

evanescente-ondine avatar Feb 02 '22 15:02 evanescente-ondine

But it would be useful to let the user decide anyway.

This can be made configurable.

Canop avatar Feb 02 '22 15:02 Canop