Kind of like an interactive
tree --fromfilecommand
An interactive tree-based search tool with file preview. Give it some path-looking things, and it'll make them readable
go install github.com/sftsrv/tri@latestPipe in a list of / separated stuff, and it'll make them interactive:
# files in a directory
find ./ | tri
# files changed in pr
git diff --name-only | tri
# using a custom previewer
git diff --name-only | tri --preview "git diff HEAD --"There are a lot of smaller improvements still left, but I've been using it for some time now and seems to work fine for me - but if you're keen to pick something up then do feel free to
- Search
- Preview with syntax highlighting (using bat if available)
- Custom preview command
- File selection
- Expand/Collapse folders
- Flatten direct paths (using
--flatflag) - Print tree (using
--printflag) - Async/non-blocking previews
- Make splits adjustable via keybinding (resize width of file tree)
- Make flat mode reactive to searching
- Make it possible to toggle flat on and off
- Allow explicit placeholder for file name in output command (like
fzf --preview "cat {}") - Tests for different formats and structures
- Fix fuzzy searching
- Regex based search in editor and via flag?
- Multi file select?
- Use
Viewport(https://github.com/charmbracelet/bubbles) withreflow(https://github.com/muesli/reflow) for improved wrapping? - better is being able to provide the size of the active terminal to the underlying process but I have no idea how to do that
