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 --"- 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) - Make flat mode reactive to searching
- Make it possible to toggle flat on and off
- Use
Viewport(https://github.com/charmbracelet/bubbles) withreflow(https://github.com/muesli/reflow) for imroved wrapping - Allow explicit placeholder for file name in output command (like
fzf --preview "cat {}") - Regex based search in editor and via flag
- Tests for different formats and structures
- Fix fuzzy searching
- Flatten files during search in flat mode
- Multi file select?
