id = "tree" name = "tree" description = "Lists directory contents in a tree-like format." executables = ["tree"] [commands] format = 1 label = "Show directory tree" description = "Print a directory tree. Colour, HTML, sorting variants and file-attribute columns are mostly left out." quality = "ai-draft" base = "fig:tree" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/tree.ts" license = "MIT" [[commands.field]] id = "dir" label = "Directory" type = "path" position = 0 multiple = true path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.field]] id = "all" label = "Include hidden files" type = "boolean" option = ["-a"] sources = ["fig"] [[commands.field]] id = "dirs_only" label = "Directories only" type = "boolean" option = ["-d"] sources = ["fig"] [[commands.field]] id = "level" label = "Max depth" type = "integer" option = ["-L"] sources = ["fig"] [[commands.field]] id = "pattern" label = "Only matching files" description = "Wildcard pattern of files to list." type = "string" option = ["-P"] sources = ["fig"] [[commands.field]] id = "ignore" label = "Exclude matching files" description = "Wildcard pattern of files to omit." type = "string" option = ["-I"] sources = ["fig"] [[commands.field]] id = "full_path" label = "Full path prefix" type = "boolean" option = ["-f"] sources = ["fig"] [[commands.field]] id = "human" label = "Human-readable sizes" type = "boolean" option = ["-h"] sources = ["fig"] [[commands.field]] id = "dirsfirst" label = "Directories first" type = "boolean" option = ["--dirsfirst"] sources = ["fig"] [[commands.field]] id = "noreport" label = "No summary report" type = "boolean" option = ["--noreport"] sources = ["fig"] [[commands.field]] id = "json" label = "JSON output" type = "boolean" option = ["-J"] sources = ["fig"] [[commands.field]] id = "output" label = "Output file" type = "path" option = ["-o"] path = { kind = "file", role = "output" } effect = "overwrite" sources = ["fig"] [[commands.task]] id = "overview" label = "Two levels deep" set = { level = [2] } fields = ["dir", "level", "dirs_only", "all"] required = [] [[commands.task]] id = "sizes" label = "With sizes" set = { human = [true] } fields = ["dir", "human", "level", "all"] required = [] [[commands.group]] id = "basic" label = "Basic" fields = ["dir", "all", "dirs_only", "level", "pattern", "ignore"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["full_path", "human", "dirsfirst", "noreport", "json", "output"]