Files
VERSE ebde9ba68f refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
2026-07-05 11:27:30 +07:00

88 lines
5.7 KiB
Go

package fs
import (
"github.com/versenilvis/iris/spec"
)
func init() {
spec.Register(&spec.Spec{
Name: "tar",
Description: "Use archive file or device ARCHIVE",
Subcommands: []spec.Subcommand{
{Name: "A", Description: "Append archive to the end of another archive"},
{Name: "c", Description: "Create a new archive"},
{Name: "b", Description: "Set record size to BLOCKSx512 bytes"},
{Name: "NUMBER", Description: "The number of bytes per record"},
{Name: "H", Description: "Create archive of the given format"},
{Name: "gnu", Description: "GNU tar 1.13.x format"},
{Name: "oldgnu", Description: "GNU format as per tar <= 1.12"},
{Name: "pax", Description: "POSIX 1003.1-2001 (pax) format"},
{Name: "ustar", Description: "POSIX 1003.1-1988 (ustar) format"},
{Name: "v7", Description: "Old V7 tar format"},
{Name: "V", Description: "Create archive with volume name TEXT"},
{Name: "failed-read", Description: "Enables warnings about unreadable files or directories"},
{Name: "no-failed-read", Description: "Suppresses warnings about unreadable files or directories"},
{Name: "o", Description: "Same as --old-archive"},
{Name: "d", Description: "Find differences between archive and file system"},
{Name: "t", Description: "List the contents of an archive"},
{Name: "r", Description: "Append files to the end of an archive"},
{Name: "u", Description: "Append files which are newer than the corresponding copy in the archive"},
{Name: "x", Description: "Extract files from an archive"},
{Name: "k", Description: "Don't replace existing files when extracting"},
{Name: "U", Description: "Remove each file prior to extracting over it"},
{Name: "O", Description: "Extract files to standard output"},
{Name: "m", Description: "Don't extract file modified time"},
{Name: "p", Description: "Extract information about file permissions"},
{Name: "s", Description: "Sort names to extract to match archive"},
{Name: "unknown-cast", Description: "\\"},
{Name: "no-unknown-cast", Description: "No \\"},
{Name: "unknown-keyword", Description: "\\"},
{Name: "no-unknown-keyword", Description: "No \\"},
{Name: "bad-dumpdir", Description: "\\"},
{Name: "?", Description: "Display a short option summary and exit"},
},
Options: []spec.Option{
{Name: "--force-local", Description: "Archive file is local even if it has a colon"},
{Name: "--rmt-command", Description: "Use COMMAND instead of rmt when accessing remote archives"},
{Name: "--rsh-command", Description: "Use COMMAND instead of rsh when accessing remote archives"},
{Name: "--volno-file", Description: "Use archive suffix to determine the compression program"},
{Name: "--lzip", Description: "Filter the archive through lzip"},
{Name: "--lzma", Description: "Filter the archive through lzma"},
{Name: "--lzop", Description: "Filter the archive through lzop"},
{Name: "--no-auto-compress", Description: "Do not use archive suffix to determine the compression program"},
{Name: "--zstd", Description: "Filter the archive through zstd"},
{Name: "--transform", Description: "Use sed replace EXPRESSION to transform file names"},
{Name: "--checkpoint", Description: "Display progress messages every Nth record"},
{Name: "--checkpoint-action", Description: "Run ACTION on each checkpoint"},
{Name: "--full-time", Description: "Print file time to its full resolution"},
{Name: "--utc", Description: "Print file modification times in UTC"},
{Name: "--ignore-failed-read", Description: "Do not exit with nonzero on unreadable files"},
{Name: "--restrict", Description: "Disable the use of some potentially harmful options"},
{Name: "--remove-files", Description: "Remove files from disk after adding them to the archive"},
{Name: "--atime-preserve", Description: "Preserve access times on dumped files"},
{Name: "--group", Description: "Force NAME as group for added files"},
{Name: "--group-map", Description: "Read group translation map from FILE"},
{Name: "--mode", Description: "Force symbolic mode CHANGES for added files"},
{Name: "--mtime", Description: "Set mtime for added files"},
{Name: "--owner", Description: "Force NAME as owner for added files"},
{Name: "--owner-map", Description: "Read owner translation map from FILE"},
{Name: "--sort", Description: "When creating an archive, sort directory entries according to ORDER"},
{Name: "--add-file", Description: "Add FILE to the archive"},
{Name: "--exclude", Description: "Exclude files matching PATTERN"},
{Name: "--exclude-backups", Description: "Exclude backup and lock files"},
{Name: "--exclude-caches", Description: "Exclude directories containing file CACHEDIR.TAG and the file itself"},
{Name: "--exclude-caches-under", Description: "Exclude everything under directories containing CACHEDIR.TAG"},
{Name: "--exclude-ignore", Description: "Read exclusion patterns from FILE in directory before dumping"},
{Name: "--exclude-ignore-recursive", Description: "Exclude contents of directories containing FILE, except for FILE itself"},
{Name: "--exclude-tag-all", Description: "Exclude directories containing FILE"},
{Name: "--exclude-tag-under", Description: "Exclude everything under directories containing FILE"},
{Name: "--exclude-vcs", Description: "Exclude version control system directories"},
{Name: "--exclude-vcs-ignores", Description: "Exclude files that match patterns read from VCS-specific ignore files"},
{Name: "--hard-dereference", Description: "Follow hard links; archive and dump the files they refer to"},
{Name: "--one-file-system", Description: "Stay in local file system when creating archive"},
{Name: "--anchored", Description: "Patterns match file name start"},
{Name: "--ignore-case", Description: "Ignore case"},
},
})
}