TREECAT(1)
π TREECAT(1) β treecat, General Commands Manual π
πΈ NAME πΈ
treecat - serialize a directory into a tree diagram, and vice versa
β¨ SYNOPSIS β¨
treecat [-avcC] [-r <file>] files...
π¦ DESCRIPTION π¦
okay so treecat has two whole modes and it's giving filesystem-to-text and text-to-filesystem realness. The description splits into options and arguments, so let's go π
π Options π
-aβ (all) do not ignore entries starting with.β yes bestie, dotfiles stay visible π-cβ (colorless) don't use ANSI escape codes to color the output β no rainbow vibes, periodt-Cβ (color) use ANSI escape codes to color the output, even when output to a pipe β force the color slay π₯-fβ (full) print filenames with full path relative to start directory β full-path realness-r <file>β (reverse) parse a treecat from<file>to create a filetree (use'-'to read from stdin) β reverse mode icon behavior-vβ (verbose) print filenames as they are extracted in reverse mode β chatty reverse mode, iykyk
π Arguments π
The interpretation of treecat's arguments depends on whether it has been invoked in reverse mode (-r) or not, but in both cases treecat takes zero or more arguments.
Normal mode (filesystem => text)
Treecat will print out a tree for each of its arguments, with the outputs of different arguments separated by a blank line. If no arguments are given, treecat will run on the current directory.
Reverse mode (text => filesystem)
If no arguments are given, treecat will attempt to parse all of its input, producing multiple different filetrees if the input contains multiple trees. The destination of the created filetrees will be taken from the root name of each tree.
If one or more arguments are given, treecat will attempt to parse one tree from its input for each argument. The name of the argument will be used as the destination of the created filetree.
π₯ OUTPUT π₯
Files that are valid UTF-8 will be output as text, and files that are not valid UTF-8 will be printed out as a hexdump.
A single-character marker is used after each filename to indicate what kind of file it is. The meanings of these are as follows:
/β directory@β symlink:β regular text file+β executable text file#β hexdump of a binary file*β hexdump of an executable binary file
A file is considered "executable" if it has the u+x permission. No other file permissions are taken into account, and any other file types will be ignored.
π Filename escaping π
Treecat performs simple backslash-escaping on filenames. The set of special escape codes are as follows:
\aβ 0x07 (alert)\bβ 0x08 (backspace)\eβ 0x1b (escape)\fβ 0x0c (form feed)\nβ 0x0a (newline)\rβ 0x0d (carriage return)\tβ 0x09 (tab)\vβ 0x0b (vertical tab)\\β 0x5c (backslash)
The rest of the ASCII control characters are all escaped as \xHH, where H is a hex digit.
π EXAMPLES π
These are the exact examples, bestie β no cap:
treecat
treecat -r input.treecat destination
curl https://git.sr.ht/~autumnull/treecat/blob/main/test/3 | treecat -r -
treecat old/a old/b old/c | treecat -r - new/a new/b new/c
π AUTHORS π
Maintained by Autumn! <autumnull@posteo.net>. Up-to-date sources can be found at https://git.sr.ht/~autumnull/treecat and bugs/patches can be submitted by email to ~autumnull/treecat-dev@lists.sr.ht
okay bestie, that's the whole page π source/version tag TREECAT(1), dated 1980-01-01 β periodt. π
π¦ where this page comes from
- nixos 26.05: treecat 1.0.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms