Skip to content

sftsrv/tri

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tri

Kind of like an interactive tree --fromfile command

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@latest

Screen recording of Tri in action

Usage

Pipe 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 --"

Features / TODOs

  • Search
  • Preview with syntax highlighting (using bat if available)
  • Custom preview command
  • File selection
  • Expand/Collapse folders
  • Flatten direct paths (using --flat flag)
  • Print tree (using --print flag)
  • Make flat mode reactive to searching
  • Make it possible to toggle flat on and off
  • Use Viewport (https://github.com/charmbracelet/bubbles) with reflow (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?

About

A general purpose interactive tree browser

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages