Files
iris-context/commands/fs/tree.go
T
VERSE 2ef3c90819 feat(commands): more commands (#30)
- I wrote a scripts to copy and generate all commands missing in iris
from fig repo: https://github.com/withfig/autocomplete
- Add a new script to generate commands docs about which commands
currently are inside commands folder
377d4aac663590e504fe39a92eb4dac4cbd333b2
- Add more icons e64d4e70a1db61e62053460a882e093bd6373ab1
2026-07-04 22:08:36 +07:00

55 lines
3.1 KiB
Go

package fs
import (
"github.com/versenilvis/iris/commands/core"
)
func init() {
core.Register(&core.Spec{
Name: "tree",
Description: "Display directories as trees (with optional color/HTML output)",
Options: []core.Option{
{Name: "-a", Description: "All files are listed"},
{Name: "-d", Description: "List directories only"},
{Name: "-l", Description: "Follow symbolic links like directories"},
{Name: "-f", Description: "Print the full path prefix for each file"},
{Name: "-x", Description: "Stay on current filesystem only"},
{Name: "-L", Description: "Descend only level directories deep"},
{Name: "-R", Description: "Rerun tree when max dir level reached"},
{Name: "-P", Description: "List only those files that match the pattern given"},
{Name: "-I", Description: "Do not list files that match the given pattern"},
{Name: "--ignore-case", Description: "Ignore case when pattern matching"},
{Name: "--matchdirs", Description: "Include directory names in -P pattern matching"},
{Name: "--noreport", Description: "Turn off file/directory count at end of tree listing"},
{Name: "--charset", Description: "Use charset X for terminal/HTML and indentation line output"},
{Name: "--filelimit", Description: "Do not descend dirs with more than # files in them"},
{Name: "--timefmt", Description: "Print and format time according to the format <f>"},
{Name: "-o", Description: "Output to file instead of stdout"},
{Name: "-q", Description: "Print non-printable characters as '?'"},
{Name: "-N", Description: "Print non-printable characters as is"},
{Name: "-Q", Description: "Quote filenames with double quotes"},
{Name: "-p", Description: "Print the protections for each file"},
{Name: "-u", Description: "Displays file owner or UID number"},
{Name: "-g", Description: "Displays file group owner or GID number"},
{Name: "-s", Description: "Print the size in bytes of each file"},
{Name: "-h", Description: "Print the size in a more human readable way"},
{Name: "--si", Description: "Like -h but use SI units (powers of 1000) instead"},
{Name: "--du", Description: "Appends '/', '=', '*', '@', '|' or '>' as per ls -F"},
{Name: "--inodes", Description: "Print inode number of each file"},
{Name: "--device", Description: "Print device ID number to which each file belongs"},
{Name: "-v", Description: "Sort files alphanumerically by version"},
{Name: "-t", Description: "Sort files by last modification time"},
{Name: "-c", Description: "Sort files by last status change time"},
{Name: "-U", Description: "Leave files unsorted"},
{Name: "-r", Description: "Reverse the order of the sort"},
{Name: "--dirsfirst", Description: "List directories before files (-U disables)"},
{Name: "--sort", Description: "Select sort"},
{Name: "-i", Description: "Don't print indentation lines"},
{Name: "-A", Description: "Print ANSI lines graphic indentation lines"},
{Name: "-S", Description: "Print with CP437 (console) graphics indentation lines"},
{Name: "-n", Description: "Turn colorization off always (-C overrides)"},
{Name: "-C", Description: "Turn colorization on always"},
},
})
}