1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

LibCore+Base: Add way to hide ArgsParser opt.s from specific usage texts

This adds the ability to hide certain options from certain help texts.
`--complete` is always hidden, whereas `--help` and `--version` are
hidden from Markdown help text only.
Note that in all cases these three options are hidden from the short
usage line.
This commit is contained in:
sin-ack 2022-04-03 22:33:09 +00:00 committed by Andreas Kling
parent a387b822a0
commit cbc89632b9
26 changed files with 57 additions and 115 deletions

View file

@ -10,9 +10,6 @@ $ UserspaceEmulator [--report-to-debug] [--pause] [--profile] [--profile-interva
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `--report-to-debug`: Write reports to the debug log
* `-p`, `--pause`: Pause on startup
* `--profile`: Generate a ProfileViewer-compatible profile

View file

@ -14,9 +14,6 @@ Show or modify values in the configuration files through ConfigServer.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-r`, `--remove`: Remove key
## Arguments:

View file

@ -14,9 +14,6 @@ Open a fortune cookie, receive a free quote for the day!
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
## Arguments:

View file

@ -10,9 +10,6 @@ $ grep [--recursive] [--extended-regexp] [--regexp Pattern] [-i] [--line-numbers
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-r`, `--recursive`: Recursively scan files
* `-E`, `--extended-regexp`: Extended regular expressions
* `-e Pattern`, `--regexp Pattern`: Pattern

View file

@ -10,9 +10,6 @@ $ gunzip [--keep] [--stdout] <FILE...>
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-k`, `--keep`: Keep (don't delete) input files
* `-c`, `--stdout`: Write to stdout, keep original files unchanged

View file

@ -10,9 +10,6 @@ $ gzip [--keep] [--stdout] [--decompress] <FILES...>
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-k`, `--keep`: Keep (don't delete) input files
* `-c`, `--stdout`: Write to stdout, keep original files unchanged
* `-d`, `--decompress`: Decompress

View file

@ -14,9 +14,6 @@ Display or modify the configuration of each network interface.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-i ip`, `--ipv4 ip`: Set the IP address of the selected network
* `-a adapter`, `--adapter adapter`: Select a specific network adapter to configure
* `-g gateway`, `--gateway gateway`: Set the default gateway of the selected network

View file

@ -14,9 +14,6 @@ List open files of a processes. This can mean actual files in the file system, s
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-p pid`: Select by PID
* `-d fd`: Select by file descriptor
* `-u login/UID`: Select by login/UID

View file

@ -14,9 +14,6 @@ Network cat: Connect to network sockets as if it were a file.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-l`, `--listen`: Listen instead of connecting
* `-v`, `--verbose`: Log everything that's happening
* `-u`, `--udp`: UDP mode

View file

@ -14,9 +14,6 @@ Display network connections
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-a`, `--all`: Display both listening and non-listening sockets
* `-l`, `--list`: Display only listening sockets
* `-t`, `--tcp`: Display only TCP network connections

View file

@ -10,9 +10,6 @@ $ nl [--body-numbering style] [--increment number] [--separator string] [--start
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-b style`, `--body-numbering style`: Line numbering style: 't' for non-empty lines, 'a' for all lines, 'n' for no lines
* `-i number`, `--increment number`: Line count increment
* `-s string`, `--separator string`: Separator between line numbers and lines

View file

@ -10,9 +10,6 @@ $ ntpquery [--adjust] [--set] [--verbose] [host]
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-a`, `--adjust`: Gradually adjust system time (requires root)
* `-s`, `--set`: Immediately set system time (requires root)
* `-v`, `--verbose`: Verbose output

View file

@ -14,9 +14,6 @@ Modify an account password.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-d`, `--delete`: Delete password
* `-l`, `--lock`: Lock password
* `-u`, `--unlock`: Unlock password

View file

@ -10,9 +10,6 @@ $ profile [-p PID] [-a] [-e] [-d] [-f] [-w] [-c command] [-t event_type]
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-p PID`: Target PID
* `-a`: Profile all processes (super-user only), result at /proc/profile
* `-e`: Enable

View file

@ -10,9 +10,6 @@ $ readelf [--all] [--file-header] [--program-headers] [--section-headers] [--hea
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-a`, `--all`: Display all
* `-h`, `--file-header`: Display ELF header
* `-l`, `--program-headers`: Display program headers

View file

@ -10,9 +10,6 @@ $ shot [--clipboard] [--delay seconds] [--screen index] [--region] [output]
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-c`, `--clipboard`: Output to clipboard
* `-d seconds`, `--delay seconds`: Seconds to wait before taking a screenshot
* `-s index`, `--screen index`: The index of the screen (default: -1 for all screens)

View file

@ -14,9 +14,6 @@ This is a client for the SerenitySQL database server.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-d database`, `--database database`: Database to connect to
* `-r file`, `--read file`: File to read
* `-s file`, `--source file`: File to source

View file

@ -14,9 +14,6 @@ Trace all syscalls and their result.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-p pid`, `--pid pid`: Trace the given PID
* `-o output`, `--output output`: Filename to write output to
* `-e exclude`, `--exclude exclude`: Comma-delimited syscalls to exclude

View file

@ -14,9 +14,6 @@ Print the end ('tail') of a file.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-f`, `--follow`: Output data as it is written to the file
* `-n number`, `--lines number`: Fetch the specified number of lines

View file

@ -10,9 +10,6 @@ $ tr [--complement] [--delete] [--squeeze-repeats] <from> [to]
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-c`, `--complement`: Take the complement of the first set
* `-d`, `--delete`: Delete characters instead of replacing
* `-s`, `--squeeze-repeats`: Omit repeated characters listed in the last given set from the output

View file

@ -10,9 +10,6 @@ $ traceroute [--max-hops hops] [--max-retries tries] [--timeout seconds] <destin
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-h hops`, `--max-hops hops`: use at most <hops> to the destination
* `-r tries`, `--max-retries tries`: retry TTL at most <tries> times
* `-t seconds`, `--timeout seconds`: wait at most <seconds> for a response

View file

@ -10,9 +10,6 @@ $ tree [--all] [--only-directories] [--maximum-depth level] [directories...]
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-a`, `--all`: Show hidden files
* `-d`, `--only-directories`: Show only directories
* `-L level`, `--maximum-depth level`: Maximum depth of the tree

View file

@ -10,9 +10,6 @@ $ truncate [--size size] [--reference file] <file>
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-s size`, `--size size`: Resize the target file to (or by) this size. Prefix with + or - to expand or shrink the file, or a bare number to set the size exactly
* `-r file`, `--reference file`: Resize the target file to match the size of this one

View file

@ -10,9 +10,6 @@ $ utmpupdate [--create] [--delete] [--PID PID] [--from From] <tty>
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--complete`: Perform autocompletion
* `-c`, `--create`: Create entry
* `-d`, `--delete`: Delete entry
* `-p PID`, `--PID PID`: PID