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
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "diff",
|
||||
Description: "Compare files line by line",
|
||||
Options: []core.Option{
|
||||
{Name: "-i", Description: "Ignore case differences in file contents"},
|
||||
{Name: "--ignore-file-name-case", Description: "Ignore case when comparing file names"},
|
||||
{Name: "--no-ignore-file-name-case", Description: "Consider case when comparing file names"},
|
||||
{Name: "-E", Description: "Ignore changes due to tab expansion"},
|
||||
{Name: "-b", Description: "Ignore changes in the amount of white space"},
|
||||
{Name: "-w", Description: "Ignore all white space"},
|
||||
{Name: "-B", Description: "Ignore changes whose lines are all blank"},
|
||||
{Name: "-I", Description: "Ignore changes whose lines all match RE"},
|
||||
{Name: "--strip-trailing-cr", Description: "Strip trailing carriage return on input"},
|
||||
{Name: "-a", Description: "Treat all files as text"},
|
||||
{Name: "-c", Description: "Output NUM lines of copied context"},
|
||||
{Name: "-u", Description: "Output NUM lines of unified context"},
|
||||
{Name: "--label", Description: "Use LABEL instead of file name"},
|
||||
{Name: "-p", Description: "Show which C function each change is in"},
|
||||
{Name: "-F", Description: "Show the most recent line matching RE"},
|
||||
{Name: "-q", Description: "Output only whether files differ"},
|
||||
{Name: "-e", Description: "Output an ed script"},
|
||||
{Name: "--normal", Description: "Output a normal diff"},
|
||||
{Name: "-n", Description: "Output an RCS format diff"},
|
||||
{Name: "-y", Description: "Output in two columns"},
|
||||
{Name: "-W", Description: "Output at most NUM (default 130) print columns"},
|
||||
{Name: "--left-column", Description: "Output only the left column of common lines"},
|
||||
{Name: "--suppress-common-lines", Description: "Do not output common lines"},
|
||||
{Name: "-D", Description: "Output merged file to show `#ifdef NAME' diffs"},
|
||||
{Name: "-l", Description: "Pass the output through `pr' to paginate it"},
|
||||
{Name: "-t", Description: "Expand tabs to spaces in output"},
|
||||
{Name: "-T", Description: "Make tabs line up by prepending a tab"},
|
||||
{Name: "-r", Description: "Recursively compare any subdirectories found"},
|
||||
{Name: "-N", Description: "Treat absent files as empty"},
|
||||
{Name: "--unidirectional-new-file", Description: "Treat absent first files as empty"},
|
||||
{Name: "-s", Description: "Report when two files are the same"},
|
||||
{Name: "-x", Description: "Exclude files that match PAT"},
|
||||
{Name: "-X", Description: "Exclude files that match any pattern in FILE"},
|
||||
{Name: "-S", Description: "Start with FILE when comparing directories"},
|
||||
{Name: "--from-file", Description: "Compare FILE1 to all operands. FILE1 can be a directory"},
|
||||
{Name: "--to-file", Description: "Compare all operands to FILE2. FILE2 can be a directory"},
|
||||
{Name: "--horizon-lines", Description: "Keep NUM lines of the common prefix and suffix"},
|
||||
{Name: "-d", Description: "Try hard to find a smaller set of changes"},
|
||||
{Name: "--speed-large-files", Description: "Assume large files and many scattered small changes"},
|
||||
{Name: "-v", Description: "Output version info"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "dos2unix",
|
||||
Description: "DOS to Unix file format converter",
|
||||
Options: []core.Option{
|
||||
{Name: "-h", Description: "Show help for dos2unix"},
|
||||
{Name: "--allow-chown", Description: "Allow file ownership change in old file mode"},
|
||||
{Name: "-ascii", Description: "Convert only line breaks. This is the default conversion mode"},
|
||||
{Name: "-iso", Description: "Conversion between DOS and ISO-8859-1 character set"},
|
||||
{Name: "-1252", Description: "Use Windows code page 1252 (Western European)"},
|
||||
{Name: "-437", Description: "Use DOS code page 850 (Western European)"},
|
||||
{Name: "-860", Description: "Use DOS code page 860 (Portuguese)"},
|
||||
{Name: "-863", Description: "Use DOS code page 863 (French Canadian)"},
|
||||
{Name: "-865", Description: "Use DOS code page 865 (Nordic)"},
|
||||
{Name: "-7", Description: "Convert 8 bit characters to 7 bit space"},
|
||||
{Name: "-b", Description: "Set conversion mode"},
|
||||
{Name: "-D", Description: "Set encoding of displayed text"},
|
||||
{Name: "-f", Description: "Force conversion of binary files"},
|
||||
{Name: "-gb", Description: "Display file information. No conversion is done"},
|
||||
{Name: "--info", Description: "Display file information. No conversion is done"},
|
||||
{Name: "-k", Description: "Display program's license"},
|
||||
{Name: "-l", Description: "Add additional newline"},
|
||||
{Name: "-m", Description: "Don't allow file ownership change in old file mode (default)"},
|
||||
{Name: "-o", Description: "Old file mode. Convert file FILE and overwrite output to it"},
|
||||
{Name: "-q", Description: "Remove Byte Order Mark (BOM). Do not write a BOM in the output file"},
|
||||
{Name: "-s", Description: "Skip binary files (default)"},
|
||||
{Name: "-u", Description: "Keep UTF-16 encoding"},
|
||||
{Name: "-ul", Description: "Assume that the input format is UTF-16LE"},
|
||||
{Name: "-ub", Description: "Assume that the input format is UTF-16BE"},
|
||||
{Name: "-v", Description: "Verbose operation"},
|
||||
{Name: "-F", Description: "Follow symbolic links and convert the targets"},
|
||||
{Name: "-R", Description: "Replace symbolic links with converted files"},
|
||||
{Name: "-S", Description: "Keep symbolic links and targets unchanged (default)"},
|
||||
{Name: "-V", Description: "Display version number"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "iconv",
|
||||
Description: "Character set conversion",
|
||||
Options: []core.Option{
|
||||
{Name: "--help", Description: "Show help for iconv"},
|
||||
{Name: "--version", Description: "Output version information and exit"},
|
||||
{Name: "-f", Description: "Specifies the encoding of the input"},
|
||||
{Name: "-t", Description: "Specifies the encoding of the output"},
|
||||
{Name: "-c", Description: "Discard unconvertible characters"},
|
||||
{Name: "-l", Description: "List the supported encodings"},
|
||||
{Name: "--unicode-subst", Description: "Substitution for unconvertible Unicode characters"},
|
||||
{Name: "--byte-subst", Description: "Substitution for unconvertible bytes"},
|
||||
{Name: "--widechar-subst", Description: "Substitution for unconvertible wide characters"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "jq",
|
||||
Description: "Output the jq version and exit with zero",
|
||||
Options: []core.Option{
|
||||
{Name: "--version", Description: "Output the jq version and exit with zero"},
|
||||
{Name: "--seq", Description: "Parse the input in streaming fashion, outputting arrays of path and leaf values"},
|
||||
{Name: "--slurp", Description: "Use a tab for each indentation level instead of two spaces"},
|
||||
{Name: "--indent", Description: "Use the given number of spaces for indentation"},
|
||||
{Name: "--color-output", Description: "Disable color"},
|
||||
{Name: "--ascii-output", Description: "Flush the output after each JSON object is printed"},
|
||||
{Name: "--sort-keys", Description: "Output the fields of each object with the keys in sorted orde"},
|
||||
{Name: "--raw-output", Description: "Like -r but jq won't print a newline after each output"},
|
||||
{Name: "-f", Description: "Read filter from the file rather than from a command line"},
|
||||
{Name: "-L", Description: "Prepend directory to the search list for modules"},
|
||||
{Name: "-e", Description: "This option passes a value to the jq program as a predefined variable"},
|
||||
{Name: "--argjson", Description: "Command-line JSON processor"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "pandoc",
|
||||
Description: "A universal document converter",
|
||||
Options: []core.Option{
|
||||
{Name: "-f", Description: "Specify input format"},
|
||||
{Name: "-t", Description: "Specify output format"},
|
||||
{Name: "-o", Description: "Write output to FILE instead of stdout"},
|
||||
{Name: "--data-dir", Description: "Specify the user data directory to search for pandoc data files"},
|
||||
{Name: "-d", Description: "Specify a set of default option settings"},
|
||||
{Name: "--bash-completion", Description: "Generate a bash completion script"},
|
||||
{Name: "--verbose", Description: "Give verbose debugging output"},
|
||||
{Name: "--quiet", Description: "Suppress warning messages"},
|
||||
{Name: "--fail-if-warnings", Description: "Exit with error status if there are any warnings"},
|
||||
{Name: "--log", Description: "Write log messages in machine-readable JSON format to FILE"},
|
||||
{Name: "--list-input-formats", Description: "List supported input formats, one per line"},
|
||||
{Name: "--list-output-formats", Description: "List supported output formats, one per line"},
|
||||
{Name: "--list-extensions", Description: "List supported languages for syntax highlighting, one per line"},
|
||||
{Name: "--list-highlight-styles", Description: "List supported styles for syntax highlighting, one per line"},
|
||||
{Name: "-v", Description: "Print version"},
|
||||
{Name: "-h", Description: "Show usage message"},
|
||||
{Name: "--shift-heading-level-by", Description: "Shift heading levels by a positive or negative integer"},
|
||||
{Name: "--indented-code-classes", Description: "Set the metadata field KEY to the value VAL"},
|
||||
{Name: "--metadata-file", Description: "Read metadata from the supplied YAML (or JSON) file"},
|
||||
{Name: "-p", Description: "Preserve tabs instead of converting them to spaces"},
|
||||
{Name: "--tab-stop", Description: "Specify the number of spaces per tab"},
|
||||
{Name: "--track-changes", Description: "Processes all the insertions and deletions and ignores comments"},
|
||||
{Name: "--extract-media", Description: "Use the specified file as a custom template for the generated document"},
|
||||
{Name: "-V", Description: "Print a system default data file. Files in the user data directory are ignored"},
|
||||
{Name: "--eol", Description: "Windows"},
|
||||
{Name: "--dpi", Description: "Attempts to wrap lines to the column width specified by --columns (default 72)"},
|
||||
{Name: "--columns", Description: "Specify the number of section levels to include in the table of contents"},
|
||||
{Name: "--strip-comments", Description: "Specifies the coloring style to be used in highlighted source code"},
|
||||
{Name: "--print-highlight-style", Description: "Include contents of FILE, verbatim, at the end of the header"},
|
||||
{Name: "-B", Description: "Include contents of FILE, verbatim, at the beginning of the document body"},
|
||||
{Name: "-A", Description: "Include contents of FILE, verbatim, at the end of the document body"},
|
||||
{Name: "--resource-path", Description: "Disable the certificate verification to allow access to unsecure HTTP resources"},
|
||||
{Name: "--self-contained", Description: "Deprecated synonym for --markdown-headings=atx"},
|
||||
{Name: "--top-level-division", Description: "Offset for section headings in HTML output (ignored in other output formats)"},
|
||||
{Name: "--listings", Description: "Make list items in slide shows display incrementally"},
|
||||
{Name: "--slide-level", Description: "Number"},
|
||||
{Name: "--section-divs", Description: "Leaves mailto: links as they are"},
|
||||
{Name: "--id-prefix", Description: "Use the specified file as a style reference in producing a docx or ODT file"},
|
||||
{Name: "--epub-cover-image", Description: "Use the specified engine when producing PDF output"},
|
||||
{Name: "--pdf-engine-opt", Description: "Use the given string as a command-line argument to the pdf-engine"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "seq",
|
||||
Description: "Print sequences of numbers. (Defaults to increments of 1)",
|
||||
Options: []core.Option{
|
||||
{Name: "-w", Description: "Equalize the widths of all numbers by padding with zeros as necessary"},
|
||||
{Name: "-s", Description: "String separator between numbers. Default is newline"},
|
||||
{Name: "-f", Description: "Use a printf(3) style format to print each number"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "sha1sum",
|
||||
Description: "Print or check SHA1 (160-bit) checksums",
|
||||
Options: []core.Option{
|
||||
{Name: "-b", Description: "Read in binary mode"},
|
||||
{Name: "-c", Description: "Read SHA1 sums from the FILEs and check them"},
|
||||
{Name: "--tag", Description: "Create a BSD-style checksum"},
|
||||
{Name: "-t", Description: "Read in text mode (default)"},
|
||||
{Name: "-z", Description: "End each output line with NUL, not newline, and disable file name escaping"},
|
||||
{Name: "--ignore-missing", Description: "Don't fail or report status for missing files"},
|
||||
{Name: "--quiet", Description: "Don't print OK for each successfully verified file"},
|
||||
{Name: "--status", Description: "Don't output anything, status code shows success"},
|
||||
{Name: "--strict", Description: "Exit non-zero for improperly formatted checksum lines"},
|
||||
{Name: "-w", Description: "Warn about improperly formatted checksum lines"},
|
||||
{Name: "--help", Description: "Output help message and exit"},
|
||||
{Name: "--version", Description: "Output version information and exit"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "shasum",
|
||||
Description: "Print or Check SHA Checksums",
|
||||
Options: []core.Option{
|
||||
{Name: "-a", Description: "Select SHA algorithm"},
|
||||
{Name: "-b", Description: "Read in binary mode"},
|
||||
{Name: "-c", Description: "Read SHA sums from the FILEs and check them"},
|
||||
{Name: "--tag", Description: "Create a BSD-style checksum"},
|
||||
{Name: "-t", Description: "Read in text mode (default)"},
|
||||
{Name: "-U", Description: "Read in Universal Newlines mode - produces same digest on Windows/Unix/Mac"},
|
||||
{Name: "-0", Description: "Read in BITS mode - ASCII '0' as 0-bit, ASCII '1' as 1-bit, others ignored"},
|
||||
{Name: "--ignore-missing", Description: "Don't fail or report status for missing files"},
|
||||
{Name: "-q", Description: "Don't print OK for each successfully verified file"},
|
||||
{Name: "-s", Description: "Don't output anything, status code shows success"},
|
||||
{Name: "--strict", Description: "Exit non-zero for improperly formatted checksum lines"},
|
||||
{Name: "-w", Description: "Warn about improperly formatted checksum lines"},
|
||||
{Name: "-h", Description: "Display help and exit"},
|
||||
{Name: "-v", Description: "Output version information and exit"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "shred",
|
||||
Description: "Overwrite a file to hide its contents, and optionally delete it",
|
||||
Options: []core.Option{
|
||||
{Name: "--force", Description: "Change permissions to allow writing if necessary"},
|
||||
{Name: "--iterations", Description: "Overwrite N times instead of the default (3)"},
|
||||
{Name: "--random-source", Description: "Get random bytes from FILE"},
|
||||
{Name: "--size", Description: "Shred this many bytes (suffixes like K, M, G accepted)"},
|
||||
{Name: "--remove", Description: "Like -u but give control on HOW to delete"},
|
||||
{Name: "--verbose", Description: "Show progress"},
|
||||
{Name: "--exact", Description: "Add a final overwrite with zeros to hide shredding"},
|
||||
{Name: "--help", Description: "Display this help and exit"},
|
||||
{Name: "--version", Description: "Output version information and exit"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "split",
|
||||
Description: "Use suffix_length letters to form the suffix of the file name",
|
||||
Options: []core.Option{
|
||||
{Name: "-a", Description: "Use suffix_length letters to form the suffix of the file name"},
|
||||
{Name: "-b", Description: "N[K|k|M|m|G|g]"},
|
||||
{Name: "-d", Description: "Use a numeric suffix instead of a alphabetic suffix"},
|
||||
{Name: "-l", Description: "Create split files line_count lines in length"},
|
||||
{Name: "-p", Description: "The file to split"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "truncate",
|
||||
Description: "Shrink or extend the size of a file to the specified size",
|
||||
Options: []core.Option{
|
||||
{Name: "--no-create", Description: "Do not create any files"},
|
||||
{Name: "--io-blocks", Description: "Treat SIZE as number of IO blocks instead of bytes"},
|
||||
{Name: "--reference", Description: "Base size on RFILE"},
|
||||
{Name: "--size", Description: "Set or adjust the file size by SIZE bytes"},
|
||||
{Name: "--help", Description: "Show help for truncate"},
|
||||
{Name: "--version", Description: "Output version information and exit"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "typos",
|
||||
Description: "Source code spelling correction",
|
||||
Options: []core.Option{
|
||||
{Name: "-c", Description: "Custom config file"},
|
||||
{Name: "--isolated", Description: "Ignore implicit configuration files"},
|
||||
{Name: "--diff", Description: "Print a diff of what would change"},
|
||||
{Name: "-w", Description: "Write fixes out"},
|
||||
{Name: "--files", Description: "Debug: Print each file that would be spellchecked"},
|
||||
{Name: "--identifiers", Description: "Debug: Print each identifier that would be spellchecked"},
|
||||
{Name: "--words", Description: "Debug: Print each word that would be spellchecked"},
|
||||
{Name: "--dump-config", Description: "Print to stdout"},
|
||||
{Name: "--type-list", Description: "Show all supported file types"},
|
||||
{Name: "--format", Description: "Set the output format"},
|
||||
{Name: "-j", Description: "The approximate number of threads to use"},
|
||||
{Name: "--exclude", Description: "Ignore files & directories matching the glob"},
|
||||
{Name: "--hidden", Description: "Search hidden files and directories"},
|
||||
{Name: "--no-ignore", Description: "Don't respect ignore files"},
|
||||
{Name: "--no-ignore-dot", Description: "Don't respect .ignore files"},
|
||||
{Name: "--no-ignore-global", Description: "Don't respect global ignore files"},
|
||||
{Name: "--no-ignore-parent", Description: "Don't respect ignore files in parent directories"},
|
||||
{Name: "--no-ignore-vcs", Description: "Don't respect ignore files in vcs directories"},
|
||||
{Name: "--binary", Description: "Search binary files"},
|
||||
{Name: "--no-check-filenames", Description: "Skip verifying spelling in file names"},
|
||||
{Name: "--no-check-files", Description: "Skip verifying spelling in files"},
|
||||
{Name: "--no-unicode", Description: "Only allow ASCII characters in identifiers"},
|
||||
{Name: "--locale", Description: "Set the locale to use"},
|
||||
{Name: "--color", Description: "Controls when to use color"},
|
||||
{Name: "-v", Description: "More output per occurrence"},
|
||||
{Name: "-q", Description: "Less output per occurrence"},
|
||||
{Name: "-h", Description: "Print help information"},
|
||||
{Name: "-V", Description: "Print version information"},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "unix2dos",
|
||||
Description: "Unix to DOS text file format convertor",
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
Name: "vale",
|
||||
Description: "A syntax-aware linter for prose built with speed and extensibility in mind",
|
||||
Subcommands: []core.Subcommand{
|
||||
{Name: "ls-config", Description: "Print the current configuration to stdout"},
|
||||
{Name: "ls-metrics", Description: "Print the given file's internal metrics to stdout"},
|
||||
{Name: "file", Description: "The path to a file you want to analyze"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
{Name: "--help", Description: "Show help for vale"},
|
||||
{Name: "--version", Description: "Print the current version"},
|
||||
{Name: "--ignore-syntax", Description: "Lint all files line-by-line"},
|
||||
{Name: "--no-exit", Description: "Don't return a nonzero exit code on errors"},
|
||||
{Name: "--no-wrap", Description: "Don't wrap CLI output"},
|
||||
{Name: "--ext", Description: "An extension to associate with stdin"},
|
||||
{Name: "--glob", Description: "A glob pattern"},
|
||||
{Name: "--minAlertLevel", Description: "The minimum level to display"},
|
||||
{Name: "--output", Description: "The alert output style to use"},
|
||||
{Name: "--config", Description: "A path to a .vale.ini file"},
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user