innernet/doc/innernet.completions.elvish

230 lines
12 KiB
Plaintext
Raw Normal View History

edit:completion:arg-completer[innernet] = [@words]{
fn spaces [n]{
repeat $n ' ' | joins ''
}
fn cand [text desc]{
edit:complex-candidate $text &display-suffix=' '(spaces (- 14 (wcswidth $text)))$desc
}
command = 'innernet'
for word $words[1:-1] {
if (has-prefix $word '-') {
break
}
command = $command';'$word
}
completions = [
&'innernet'= {
2021-12-05 17:35:18 +00:00
cand -c 'c'
cand --config-dir 'config-dir'
cand -d 'd'
cand --data-dir 'data-dir'
cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability'
2021-06-14 14:53:02 +00:00
cand --mtu 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)'
2021-05-31 15:23:14 +00:00
cand -v 'Verbose output, use -vv for even higher verbositude'
cand --verbose 'Verbose output, use -vv for even higher verbositude'
cand --no-routing 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand install 'Install a new innernet config'
cand show 'Enumerate all innernet connections'
cand up 'Bring up your local interface, and update it with latest peer list'
cand fetch 'Fetch and update your local interface with the latest peer list'
cand uninstall 'Uninstall an innernet network'
2021-11-11 09:42:21 +00:00
cand down 'Bring down the interface (equivalent to ''wg-quick down <interface>'')'
cand add-peer 'Add a new peer'
2021-05-31 15:23:14 +00:00
cand rename-peer 'Rename a peer'
cand add-cidr 'Add a new CIDR'
cand delete-cidr 'Delete a CIDR'
2021-06-14 14:53:02 +00:00
cand list-cidrs 'List CIDRs'
cand disable-peer 'Disable an enabled peer'
cand enable-peer 'Enable a disabled peer'
cand add-association 'Add an association between CIDRs'
cand delete-association 'Delete an association between CIDRs'
cand list-associations 'List existing assocations between CIDRs'
cand set-listen-port 'Set the local listen port'
cand override-endpoint 'Override your external endpoint that the server sends to other peers'
cand completions 'Generate shell completion scripts'
cand help 'Prints this message or the help of the given subcommand(s)'
}
&'innernet;install'= {
cand --hosts-path 'The path to write hosts to'
cand --name 'Set a specific interface name'
2021-12-05 17:35:18 +00:00
cand --exclude-nat-candidates 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates ''0.0.0.0/0'' would report no candidates'
cand --no-write-hosts 'Don''t write to any hosts files'
cand --default-name 'Use the network name inside the invitation as the interface name'
cand -d 'Delete the invitation after a successful install'
cand --delete-invite 'Delete the invitation after a successful install'
2021-12-05 17:35:18 +00:00
cand --no-nat-traversal 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
cand --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0'''
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;show'= {
cand -s 'One-line peer list'
cand --short 'One-line peer list'
cand -t 'Display peers in a tree based on the CIDRs'
cand --tree 'Display peers in a tree based on the CIDRs'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;up'= {
cand --interval 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode'
cand --hosts-path 'The path to write hosts to'
2021-12-05 17:35:18 +00:00
cand --exclude-nat-candidates 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates ''0.0.0.0/0'' would report no candidates'
cand -d 'Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically'
cand --daemon 'Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically'
cand --no-write-hosts 'Don''t write to any hosts files'
2021-12-05 17:35:18 +00:00
cand --no-nat-traversal 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
cand --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0'''
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;fetch'= {
cand --hosts-path 'The path to write hosts to'
2021-12-05 17:35:18 +00:00
cand --exclude-nat-candidates 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates ''0.0.0.0/0'' would report no candidates'
cand --no-write-hosts 'Don''t write to any hosts files'
2021-12-05 17:35:18 +00:00
cand --no-nat-traversal 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
cand --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0'''
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;uninstall'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;down'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;add-peer'= {
cand --name 'Name of new peer'
cand --ip 'Specify desired IP of new peer (within parent CIDR)'
cand --cidr 'Name of CIDR to add new peer under'
cand --admin 'Make new peer an admin?'
cand --save-config 'Save the config to the given location'
2021-11-11 09:42:21 +00:00
cand --invite-expires 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')'
cand --auto-ip 'Auto-assign the peer the first available IP within the CIDR'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
2021-05-31 15:23:14 +00:00
&'innernet;rename-peer'= {
cand --name 'Name of peer to rename'
cand --new-name 'The new name of the peer'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;add-cidr'= {
2021-11-11 09:42:21 +00:00
cand --name 'The CIDR name (eg. ''engineers'')'
cand --cidr 'The CIDR network (eg. ''10.42.5.0/24'')'
cand --parent 'The CIDR parent name'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;delete-cidr'= {
2021-11-11 09:42:21 +00:00
cand --name 'The CIDR name (eg. ''engineers'')'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
2021-06-14 14:53:02 +00:00
&'innernet;list-cidrs'= {
cand -t 'Display CIDRs in tree format'
cand --tree 'Display CIDRs in tree format'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;disable-peer'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;enable-peer'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;add-association'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;delete-association'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;list-associations'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;set-listen-port'= {
2021-12-05 17:35:18 +00:00
cand -l 'The listen port you''d like to set for the interface'
cand --listen-port 'The listen port you''d like to set for the interface'
cand -u 'Unset the local listen port to use a randomized port'
cand --unset 'Unset the local listen port to use a randomized port'
2021-12-05 17:35:18 +00:00
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;override-endpoint'= {
2021-12-05 17:35:18 +00:00
cand -e 'The listen port you''d like to set for the interface'
cand --endpoint 'The listen port you''d like to set for the interface'
cand -u 'Unset an existing override to use the automatic endpoint discovery'
cand --unset 'Unset an existing override to use the automatic endpoint discovery'
2021-12-05 17:35:18 +00:00
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;completions'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'innernet;help'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
]
$completions[$command]
}