5 releases

0.1.4 Jun 9, 2023
0.1.3 Jun 8, 2023
0.1.2 Jun 8, 2023
0.1.1 Jun 8, 2023
0.1.0 Jun 8, 2023

#9 in #target-file

25 downloads per month

Custom license

19KB
386 lines

lstree

ls and tree combined.

Usage: lstree [OPTIONS] [File]...

Arguments:
  [File]...  The target file(s) or directories [default: ./]

Options:
  -b, --block-size <Block size>               [default: ]
  -l, --long                                  
  -a, --all                                   
  -d, --dir-only                              
  -r, --reverse                               
  -p, --print-all-file                        
  -e, --exclude <Ignore files base on regex>  [default: ]
  -t, --tree-spacer <Tree spacer>             [default: "  "]
  -h, --help                                  Print help
  -V, --version                               Print version

Examples

Exclude file or directory

lstree -e target

Exclude more complex regex

lstree -e "(target)|(.rs)"

Make file tree grepable. Will print full paths seperated by spaces.

# Without --print-all-file or -p
lstree -e "target"
# Cargo.toml
# LICENSE
# Cargo.lock
# README.md
# src
#   tree_generator.rs
#   main.rs
#   tree_renderer.rs


# With --print-all-file or -p
lstree -p -e "target"
# Cargo.toml
# LICENSE
# Cargo.lock
# README.md
# src
# src  tree_generator.rs
# src  main.rs
# src  tree_renderer.rs


# So can grep stuff and know the path of the file
lstree -p -e "target" | grep main
# src  main.rs

CHANGELOG

Dependencies

~4–16MB
~147K SLoC