meta: release v1.6.0 (ran on Linux) (#270)

* meta: release v1.6.0

* README: update release steps
pull/272/head v1.6.0
Matěj Laitl 2023-06-14 10:49:16 +02:00 committed by GitHub
parent 0998593d55
commit 8d058c8d87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 1546 additions and 433 deletions

10
Cargo.lock generated
View File

@ -190,7 +190,7 @@ checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
[[package]] [[package]]
name = "client" name = "client"
version = "1.5.5" version = "1.6.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@ -751,7 +751,7 @@ dependencies = [
[[package]] [[package]]
name = "netlink-request" name = "netlink-request"
version = "1.5.5" version = "1.6.0"
dependencies = [ dependencies = [
"netlink-packet-core", "netlink-packet-core",
"netlink-packet-generic", "netlink-packet-generic",
@ -1050,7 +1050,7 @@ dependencies = [
[[package]] [[package]]
name = "server" name = "server"
version = "1.5.5" version = "1.6.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -1085,7 +1085,7 @@ dependencies = [
[[package]] [[package]]
name = "shared" name = "shared"
version = "1.5.5" version = "1.6.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"atty", "atty",
@ -1591,7 +1591,7 @@ dependencies = [
[[package]] [[package]]
name = "wireguard-control" name = "wireguard-control"
version = "1.5.5" version = "1.6.0"
dependencies = [ dependencies = [
"base64", "base64",
"hex", "hex",

View File

@ -216,10 +216,10 @@ brew install tonarino/innernet/innernet
```sh ```sh
# to install innernet: # to install innernet:
cargo install --git https://github.com/tonarino/innernet --tag v1.5.5 client cargo install --git https://github.com/tonarino/innernet --tag v1.6.0 client
# to install innernet-server: # to install innernet-server:
cargo install --git https://github.com/tonarino/innernet --tag v1.5.5 server cargo install --git https://github.com/tonarino/innernet --tag v1.6.0 server
``` ```
Note that you'll be responsible for updating manually. Note that you'll be responsible for updating manually.
@ -255,6 +255,8 @@ The resulting binary will be located at `./target/release/innernet`
### Releases ### Releases
1. Run `cargo release [--dry-run] [minor|major|patch|...]` to automatically bump the crates appropriately. Please run the release script from a Linux machine: generated shell completions depend on available wireguard backends and Mac doesn't support the `kernel` backend.
2. Create a new git tag (ex. `v0.6.0`).
3. Push (with tags) to the repo. 1. Fetch and check-out the `main` branch.
2. Run `./release.sh [patch|major|minor|rc]`
3. Push the `main` branch and the created tag to the repo.

View File

@ -13,7 +13,7 @@ name = "client"
publish = false publish = false
readme = "README.md" readme = "README.md"
repository = "https://github.com/tonarino/innernet" repository = "https://github.com/tonarino/innernet"
version = "1.5.5" version = "1.6.0"
[[bin]] [[bin]]
name = "innernet" name = "innernet"

View File

@ -1,48 +1,19 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH INNERNET-SERVER "8" "September 2022" "innernet-server 1.5.5" "System Administration Utilities" .TH INNERNET-SERVER "8" "June 2023" "innernet-server 1.6.0" "System Administration Utilities"
.SH NAME .SH NAME
innernet-server \- manual page for innernet-server 1.5.5 innernet-server \- manual page for innernet-server 1.6.0
.SH SYNOPSIS
.B innernet-server
[\fI\,OPTIONS\/\fR] \fI\,<COMMAND>\/\fR
.SH DESCRIPTION .SH DESCRIPTION
innernet\-server 1.5.5
Jake McGinty <me@jake.su>
A server to coordinate innernet networks. A server to coordinate innernet networks.
.SS "USAGE:" .SS "Commands:"
.IP
innernet\-server [OPTIONS] <SUBCOMMAND>
.SS "OPTIONS:"
.TP
\fB\-c\fR, \fB\-\-config\-dir\fR <CONFIG_DIR>
[default: /etc/innernet\-server]
.TP
\fB\-d\fR, \fB\-\-data\-dir\fR <DATA_DIR>
[default: /var/lib/innernet\-server]
.TP
\fB\-\-no\-routing\fR
Whether the routing should be done by innernet or is done by an
external tool like e.g. babeld
.TP
\fB\-\-backend\fR <BACKEND>
Specify a WireGuard backend to use. If not set, innernet will
auto\-select based on availability [default: kernel] [possible
values: kernel, userspace]
.TP
\fB\-\-mtu\fR <MTU>
Specify the desired MTU for your interface (default: 1280)
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help information
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version information
.SS "SUBCOMMANDS:"
.TP .TP
new new
Create a new network Create a new network
.TP .TP
uninstall uninstall
Permanently uninstall a created network, rendering it unusable. Use with Permanently uninstall a created network, rendering it unusable. Use with care
.IP
care
.TP .TP
serve serve
Serve the coordinating server for an existing network Serve the coordinating server for an existing network
@ -70,3 +41,28 @@ Generate shell completion scripts
.TP .TP
help help
Print this message or the help of the given subcommand(s) Print this message or the help of the given subcommand(s)
.SH OPTIONS
.TP
\fB\-c\fR, \fB\-\-config\-dir\fR <CONFIG_DIR>
[default: /etc/innernet\-server]
.TP
\fB\-d\fR, \fB\-\-data\-dir\fR <DATA_DIR>
[default: /var/lib/innernet\-server]
.TP
\fB\-\-no\-routing\fR
Whether the routing should be done by innernet or is done by an
external tool like e.g. babeld
.TP
\fB\-\-backend\fR <BACKEND>
Specify a WireGuard backend to use. If not set, innernet will
auto\-select based on availability [default: kernel] [possible
values: kernel, userspace]
.TP
\fB\-\-mtu\fR <MTU>
Specify the desired MTU for your interface (default: 1280)
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version

Binary file not shown.

View File

@ -1,5 +1,5 @@
_innernet-server() { _innernet-server() {
local i cur prev opts cmds local i cur prev opts cmd
COMPREPLY=() COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}" cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}" prev="${COMP_WORDS[COMP_CWORD-1]}"
@ -8,42 +8,75 @@ _innernet-server() {
for i in ${COMP_WORDS[@]} for i in ${COMP_WORDS[@]}
do do
case "${i}" in case "${cmd},${i}" in
"$1") ",$1")
cmd="innernet__server" cmd="innernet__server"
;; ;;
add-cidr) innernet__server,add-cidr)
cmd+="__add__cidr" cmd="innernet__server__add__cidr"
;; ;;
add-peer) innernet__server,add-peer)
cmd+="__add__peer" cmd="innernet__server__add__peer"
;; ;;
completions) innernet__server,completions)
cmd+="__completions" cmd="innernet__server__completions"
;; ;;
delete-cidr) innernet__server,delete-cidr)
cmd+="__delete__cidr" cmd="innernet__server__delete__cidr"
;; ;;
disable-peer) innernet__server,disable-peer)
cmd+="__disable__peer" cmd="innernet__server__disable__peer"
;; ;;
enable-peer) innernet__server,enable-peer)
cmd+="__enable__peer" cmd="innernet__server__enable__peer"
;; ;;
help) innernet__server,help)
cmd+="__help" cmd="innernet__server__help"
;; ;;
new) innernet__server,new)
cmd+="__new" cmd="innernet__server__new"
;; ;;
rename-peer) innernet__server,rename-peer)
cmd+="__rename__peer" cmd="innernet__server__rename__peer"
;; ;;
serve) innernet__server,serve)
cmd+="__serve" cmd="innernet__server__serve"
;; ;;
uninstall) innernet__server,uninstall)
cmd+="__uninstall" cmd="innernet__server__uninstall"
;;
innernet__server__help,add-cidr)
cmd="innernet__server__help__add__cidr"
;;
innernet__server__help,add-peer)
cmd="innernet__server__help__add__peer"
;;
innernet__server__help,completions)
cmd="innernet__server__help__completions"
;;
innernet__server__help,delete-cidr)
cmd="innernet__server__help__delete__cidr"
;;
innernet__server__help,disable-peer)
cmd="innernet__server__help__disable__peer"
;;
innernet__server__help,enable-peer)
cmd="innernet__server__help__enable__peer"
;;
innernet__server__help,help)
cmd="innernet__server__help__help"
;;
innernet__server__help,new)
cmd="innernet__server__help__new"
;;
innernet__server__help,rename-peer)
cmd="innernet__server__help__rename__peer"
;;
innernet__server__help,serve)
cmd="innernet__server__help__serve"
;;
innernet__server__help,uninstall)
cmd="innernet__server__help__uninstall"
;; ;;
*) *)
;; ;;
@ -52,7 +85,7 @@ _innernet-server() {
case "${cmd}" in case "${cmd}" in
innernet__server) innernet__server)
opts="-h -V -c -d --help --version --config-dir --data-dir --no-routing --backend --mtu new uninstall serve add-peer disable-peer enable-peer rename-peer add-cidr delete-cidr completions help" opts="-c -d -h -V --config-dir --data-dir --no-routing --backend --mtu --help --version new uninstall serve add-peer disable-peer enable-peer rename-peer add-cidr delete-cidr completions help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
@ -135,7 +168,7 @@ _innernet-server() {
return 0 return 0
;; ;;
--admin) --admin)
COMPREPLY=($(compgen -f "${cur}")) COMPREPLY=($(compgen -W "true false" -- "${cur}"))
return 0 return 0
;; ;;
--save-config) --save-config)
@ -214,7 +247,7 @@ _innernet-server() {
return 0 return 0
;; ;;
innernet__server__help) innernet__server__help)
opts="<SUBCOMMAND>..." opts="new uninstall serve add-peer disable-peer enable-peer rename-peer add-cidr delete-cidr completions help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
@ -227,6 +260,160 @@ _innernet-server() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
;; ;;
innernet__server__help__add__cidr)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__add__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__completions)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__delete__cidr)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__disable__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__enable__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__help)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__new)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__rename__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__serve)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__uninstall)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__new) innernet__server__new)
opts="-h --network-name --network-cidr --external-endpoint --auto-external-endpoint --listen-port --help" opts="-h --network-name --network-cidr --external-endpoint --auto-external-endpoint --listen-port --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then

View File

@ -24,11 +24,11 @@ set edit:completion:arg-completer[innernet-server] = {|@words|
cand --data-dir 'data-dir' cand --data-dir 'data-dir'
cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability'
cand --mtu 'Specify the desired MTU for your interface (default: 1280)' cand --mtu 'Specify the desired MTU for your interface (default: 1280)'
cand -h 'Print help information'
cand --help 'Print help information'
cand -V 'Print version information'
cand --version 'Print version information'
cand --no-routing 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld' cand --no-routing 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
cand -h 'Print help'
cand --help 'Print help'
cand -V 'Print version'
cand --version 'Print version'
cand new 'Create a new network' cand new 'Create a new network'
cand uninstall 'Permanently uninstall a created network, rendering it unusable. Use with care' cand uninstall 'Permanently uninstall a created network, rendering it unusable. Use with care'
cand serve 'Serve the coordinating server for an existing network' cand serve 'Serve the coordinating server for an existing network'
@ -47,20 +47,20 @@ set edit:completion:arg-completer[innernet-server] = {|@words|
cand --external-endpoint 'This server''s external endpoint (ex: 100.100.100.100:51820)' cand --external-endpoint 'This server''s external endpoint (ex: 100.100.100.100:51820)'
cand --listen-port 'Port to listen on (for the WireGuard interface)' cand --listen-port 'Port to listen on (for the WireGuard interface)'
cand --auto-external-endpoint 'Auto-resolve external endpoint' cand --auto-external-endpoint 'Auto-resolve external endpoint'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet-server;uninstall'= { &'innernet-server;uninstall'= {
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet-server;serve'= { &'innernet-server;serve'= {
cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability'
cand --mtu 'Specify the desired MTU for your interface (default: 1280)' cand --mtu 'Specify the desired MTU for your interface (default: 1280)'
cand --no-routing 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld' cand --no-routing 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet-server;add-peer'= { &'innernet-server;add-peer'= {
cand --name 'Name of new peer' cand --name 'Name of new peer'
@ -71,43 +71,76 @@ set edit:completion:arg-completer[innernet-server] = {|@words|
cand --invite-expires 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')' 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 --auto-ip 'Auto-assign the peer the first available IP within the CIDR'
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet-server;disable-peer'= { &'innernet-server;disable-peer'= {
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet-server;enable-peer'= { &'innernet-server;enable-peer'= {
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet-server;rename-peer'= { &'innernet-server;rename-peer'= {
cand --name 'Name of peer to rename' cand --name 'Name of peer to rename'
cand --new-name 'The new name of the peer' cand --new-name 'The new name of the peer'
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet-server;add-cidr'= { &'innernet-server;add-cidr'= {
cand --name 'The CIDR name (eg. ''engineers'')' cand --name 'The CIDR name (eg. ''engineers'')'
cand --cidr 'The CIDR network (eg. ''10.42.5.0/24'')' cand --cidr 'The CIDR network (eg. ''10.42.5.0/24'')'
cand --parent 'The CIDR parent name' cand --parent 'The CIDR parent name'
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet-server;delete-cidr'= { &'innernet-server;delete-cidr'= {
cand --name 'The CIDR name (eg. ''engineers'')' cand --name 'The CIDR name (eg. ''engineers'')'
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet-server;completions'= { &'innernet-server;completions'= {
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet-server;help'= { &'innernet-server;help'= {
cand new 'Create a new network'
cand uninstall 'Permanently uninstall a created network, rendering it unusable. Use with care'
cand serve 'Serve the coordinating server for an existing network'
cand add-peer 'Add a peer to an existing network'
cand disable-peer 'Disable an enabled peer'
cand enable-peer 'Enable a disabled peer'
cand rename-peer 'Rename an existing peer'
cand add-cidr 'Add a new CIDR to an existing network'
cand delete-cidr 'Delete a CIDR'
cand completions 'Generate shell completion scripts'
cand help 'Print this message or the help of the given subcommand(s)'
}
&'innernet-server;help;new'= {
}
&'innernet-server;help;uninstall'= {
}
&'innernet-server;help;serve'= {
}
&'innernet-server;help;add-peer'= {
}
&'innernet-server;help;disable-peer'= {
}
&'innernet-server;help;enable-peer'= {
}
&'innernet-server;help;rename-peer'= {
}
&'innernet-server;help;add-cidr'= {
}
&'innernet-server;help;delete-cidr'= {
}
&'innernet-server;help;completions'= {
}
&'innernet-server;help;help'= {
} }
] ]
$completions[$command] $completions[$command]

View File

@ -1,10 +1,10 @@
complete -c innernet-server -n "__fish_use_subcommand" -s c -l config-dir -r complete -c innernet-server -n "__fish_use_subcommand" -s c -l config-dir -r -F
complete -c innernet-server -n "__fish_use_subcommand" -s d -l data-dir -r complete -c innernet-server -n "__fish_use_subcommand" -s d -l data-dir -r -F
complete -c innernet-server -n "__fish_use_subcommand" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "{kernel ,userspace }" complete -c innernet-server -n "__fish_use_subcommand" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "{kernel ,userspace }"
complete -c innernet-server -n "__fish_use_subcommand" -l mtu -d 'Specify the desired MTU for your interface (default: 1280)' -r complete -c innernet-server -n "__fish_use_subcommand" -l mtu -d 'Specify the desired MTU for your interface (default: 1280)' -r
complete -c innernet-server -n "__fish_use_subcommand" -s h -l help -d 'Print help information'
complete -c innernet-server -n "__fish_use_subcommand" -s V -l version -d 'Print version information'
complete -c innernet-server -n "__fish_use_subcommand" -l no-routing -d 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld' complete -c innernet-server -n "__fish_use_subcommand" -l no-routing -d 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
complete -c innernet-server -n "__fish_use_subcommand" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_use_subcommand" -s V -l version -d 'Print version'
complete -c innernet-server -n "__fish_use_subcommand" -f -a "new" -d 'Create a new network' complete -c innernet-server -n "__fish_use_subcommand" -f -a "new" -d 'Create a new network'
complete -c innernet-server -n "__fish_use_subcommand" -f -a "uninstall" -d 'Permanently uninstall a created network, rendering it unusable. Use with care' complete -c innernet-server -n "__fish_use_subcommand" -f -a "uninstall" -d 'Permanently uninstall a created network, rendering it unusable. Use with care'
complete -c innernet-server -n "__fish_use_subcommand" -f -a "serve" -d 'Serve the coordinating server for an existing network' complete -c innernet-server -n "__fish_use_subcommand" -f -a "serve" -d 'Serve the coordinating server for an existing network'
@ -21,34 +21,45 @@ complete -c innernet-server -n "__fish_seen_subcommand_from new" -l network-cidr
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l external-endpoint -d 'This server\'s external endpoint (ex: 100.100.100.100:51820)' -r complete -c innernet-server -n "__fish_seen_subcommand_from new" -l external-endpoint -d 'This server\'s external endpoint (ex: 100.100.100.100:51820)' -r
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l listen-port -d 'Port to listen on (for the WireGuard interface)' -r complete -c innernet-server -n "__fish_seen_subcommand_from new" -l listen-port -d 'Port to listen on (for the WireGuard interface)' -r
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l auto-external-endpoint -d 'Auto-resolve external endpoint' complete -c innernet-server -n "__fish_seen_subcommand_from new" -l auto-external-endpoint -d 'Auto-resolve external endpoint'
complete -c innernet-server -n "__fish_seen_subcommand_from new" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from new" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_seen_subcommand_from uninstall" -l yes -d 'Bypass confirmation' complete -c innernet-server -n "__fish_seen_subcommand_from uninstall" -l yes -d 'Bypass confirmation'
complete -c innernet-server -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "{kernel ,userspace }" complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "{kernel ,userspace }"
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l mtu -d 'Specify the desired MTU for your interface (default: 1280)' -r complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l mtu -d 'Specify the desired MTU for your interface (default: 1280)' -r
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l no-routing -d 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld' complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l no-routing -d 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from serve" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l name -d 'Name of new peer' -r complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l name -d 'Name of new peer' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l ip -d 'Specify desired IP of new peer (within parent CIDR)' -r complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l ip -d 'Specify desired IP of new peer (within parent CIDR)' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l cidr -d 'Name of CIDR to add new peer under' -r complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l cidr -d 'Name of CIDR to add new peer under' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l admin -d 'Make new peer an admin?' -r complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l admin -d 'Make new peer an admin?' -r -f -a "{true ,false }"
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l save-config -d 'Save the config to the given location' -r complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l save-config -d 'Save the config to the given location' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l invite-expires -d 'Invite expiration period (eg. \'30d\', \'7w\', \'2h\', \'60m\', \'1000s\')' -r complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l invite-expires -d 'Invite expiration period (eg. \'30d\', \'7w\', \'2h\', \'60m\', \'1000s\')' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l auto-ip -d 'Auto-assign the peer the first available IP within the CIDR' complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l auto-ip -d 'Auto-assign the peer the first available IP within the CIDR'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l yes -d 'Bypass confirmation' complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l yes -d 'Bypass confirmation'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_seen_subcommand_from disable-peer" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from disable-peer" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_seen_subcommand_from enable-peer" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from enable-peer" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename' -r complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename' -r
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer' -r complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer' -r
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l yes -d 'Bypass confirmation' complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l yes -d 'Bypass confirmation'
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l cidr -d 'The CIDR network (eg. \'10.42.5.0/24\')' -r complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l cidr -d 'The CIDR network (eg. \'10.42.5.0/24\')' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l parent -d 'The CIDR parent name' -r complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l parent -d 'The CIDR parent name' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l yes -d 'Bypass confirmation' complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l yes -d 'Bypass confirmation'
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r
complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -l yes -d 'Bypass confirmation' complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -l yes -d 'Bypass confirmation'
complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Print help'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "new" -d 'Create a new network'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "uninstall" -d 'Permanently uninstall a created network, rendering it unusable. Use with care'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "serve" -d 'Serve the coordinating server for an existing network'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "add-peer" -d 'Add a peer to an existing network'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "disable-peer" -d 'Disable an enabled peer'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "enable-peer" -d 'Enable a disabled peer'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "rename-peer" -d 'Rename an existing peer'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "add-cidr" -d 'Add a new CIDR to an existing network'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "delete-cidr" -d 'Delete a CIDR'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "completions" -d 'Generate shell completion scripts'
complete -c innernet-server -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from new; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'

View File

@ -27,11 +27,11 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock {
[CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'data-dir') [CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'data-dir')
[CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability') [CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability')
[CompletionResult]::new('--mtu', 'mtu', [CompletionResultType]::ParameterName, 'Specify the desired MTU for your interface (default: 1280)') [CompletionResult]::new('--mtu', 'mtu', [CompletionResultType]::ParameterName, 'Specify the desired MTU for your interface (default: 1280)')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version information')
[CompletionResult]::new('--no-routing', 'no-routing', [CompletionResultType]::ParameterName, 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld') [CompletionResult]::new('--no-routing', 'no-routing', [CompletionResultType]::ParameterName, 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version')
[CompletionResult]::new('new', 'new', [CompletionResultType]::ParameterValue, 'Create a new network') [CompletionResult]::new('new', 'new', [CompletionResultType]::ParameterValue, 'Create a new network')
[CompletionResult]::new('uninstall', 'uninstall', [CompletionResultType]::ParameterValue, 'Permanently uninstall a created network, rendering it unusable. Use with care') [CompletionResult]::new('uninstall', 'uninstall', [CompletionResultType]::ParameterValue, 'Permanently uninstall a created network, rendering it unusable. Use with care')
[CompletionResult]::new('serve', 'serve', [CompletionResultType]::ParameterValue, 'Serve the coordinating server for an existing network') [CompletionResult]::new('serve', 'serve', [CompletionResultType]::ParameterValue, 'Serve the coordinating server for an existing network')
@ -51,22 +51,22 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock {
[CompletionResult]::new('--external-endpoint', 'external-endpoint', [CompletionResultType]::ParameterName, 'This server''s external endpoint (ex: 100.100.100.100:51820)') [CompletionResult]::new('--external-endpoint', 'external-endpoint', [CompletionResultType]::ParameterName, 'This server''s external endpoint (ex: 100.100.100.100:51820)')
[CompletionResult]::new('--listen-port', 'listen-port', [CompletionResultType]::ParameterName, 'Port to listen on (for the WireGuard interface)') [CompletionResult]::new('--listen-port', 'listen-port', [CompletionResultType]::ParameterName, 'Port to listen on (for the WireGuard interface)')
[CompletionResult]::new('--auto-external-endpoint', 'auto-external-endpoint', [CompletionResultType]::ParameterName, 'Auto-resolve external endpoint') [CompletionResult]::new('--auto-external-endpoint', 'auto-external-endpoint', [CompletionResultType]::ParameterName, 'Auto-resolve external endpoint')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet-server;uninstall' { 'innernet-server;uninstall' {
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet-server;serve' { 'innernet-server;serve' {
[CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability') [CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability')
[CompletionResult]::new('--mtu', 'mtu', [CompletionResultType]::ParameterName, 'Specify the desired MTU for your interface (default: 1280)') [CompletionResult]::new('--mtu', 'mtu', [CompletionResultType]::ParameterName, 'Specify the desired MTU for your interface (default: 1280)')
[CompletionResult]::new('--no-routing', 'no-routing', [CompletionResultType]::ParameterName, 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld') [CompletionResult]::new('--no-routing', 'no-routing', [CompletionResultType]::ParameterName, 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet-server;add-peer' { 'innernet-server;add-peer' {
@ -78,26 +78,26 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock {
[CompletionResult]::new('--invite-expires', 'invite-expires', [CompletionResultType]::ParameterName, 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')') [CompletionResult]::new('--invite-expires', 'invite-expires', [CompletionResultType]::ParameterName, 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')')
[CompletionResult]::new('--auto-ip', 'auto-ip', [CompletionResultType]::ParameterName, 'Auto-assign the peer the first available IP within the CIDR') [CompletionResult]::new('--auto-ip', 'auto-ip', [CompletionResultType]::ParameterName, 'Auto-assign the peer the first available IP within the CIDR')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet-server;disable-peer' { 'innernet-server;disable-peer' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet-server;enable-peer' { 'innernet-server;enable-peer' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet-server;rename-peer' { 'innernet-server;rename-peer' {
[CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Name of peer to rename') [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Name of peer to rename')
[CompletionResult]::new('--new-name', 'new-name', [CompletionResultType]::ParameterName, 'The new name of the peer') [CompletionResult]::new('--new-name', 'new-name', [CompletionResultType]::ParameterName, 'The new name of the peer')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet-server;add-cidr' { 'innernet-server;add-cidr' {
@ -105,23 +105,67 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock {
[CompletionResult]::new('--cidr', 'cidr', [CompletionResultType]::ParameterName, 'The CIDR network (eg. ''10.42.5.0/24'')') [CompletionResult]::new('--cidr', 'cidr', [CompletionResultType]::ParameterName, 'The CIDR network (eg. ''10.42.5.0/24'')')
[CompletionResult]::new('--parent', 'parent', [CompletionResultType]::ParameterName, 'The CIDR parent name') [CompletionResult]::new('--parent', 'parent', [CompletionResultType]::ParameterName, 'The CIDR parent name')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet-server;delete-cidr' { 'innernet-server;delete-cidr' {
[CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'The CIDR name (eg. ''engineers'')') [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'The CIDR name (eg. ''engineers'')')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet-server;completions' { 'innernet-server;completions' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet-server;help' { 'innernet-server;help' {
[CompletionResult]::new('new', 'new', [CompletionResultType]::ParameterValue, 'Create a new network')
[CompletionResult]::new('uninstall', 'uninstall', [CompletionResultType]::ParameterValue, 'Permanently uninstall a created network, rendering it unusable. Use with care')
[CompletionResult]::new('serve', 'serve', [CompletionResultType]::ParameterValue, 'Serve the coordinating server for an existing network')
[CompletionResult]::new('add-peer', 'add-peer', [CompletionResultType]::ParameterValue, 'Add a peer to an existing network')
[CompletionResult]::new('disable-peer', 'disable-peer', [CompletionResultType]::ParameterValue, 'Disable an enabled peer')
[CompletionResult]::new('enable-peer', 'enable-peer', [CompletionResultType]::ParameterValue, 'Enable a disabled peer')
[CompletionResult]::new('rename-peer', 'rename-peer', [CompletionResultType]::ParameterValue, 'Rename an existing peer')
[CompletionResult]::new('add-cidr', 'add-cidr', [CompletionResultType]::ParameterValue, 'Add a new CIDR to an existing network')
[CompletionResult]::new('delete-cidr', 'delete-cidr', [CompletionResultType]::ParameterValue, 'Delete a CIDR')
[CompletionResult]::new('completions', 'completions', [CompletionResultType]::ParameterValue, 'Generate shell completion scripts')
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
break
}
'innernet-server;help;new' {
break
}
'innernet-server;help;uninstall' {
break
}
'innernet-server;help;serve' {
break
}
'innernet-server;help;add-peer' {
break
}
'innernet-server;help;disable-peer' {
break
}
'innernet-server;help;enable-peer' {
break
}
'innernet-server;help;rename-peer' {
break
}
'innernet-server;help;add-cidr' {
break
}
'innernet-server;help;delete-cidr' {
break
}
'innernet-server;help;completions' {
break
}
'innernet-server;help;help' {
break break
} }
}) })

View File

@ -15,17 +15,17 @@ _innernet-server() {
local context curcontext="$curcontext" state line local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-c+[]:CONFIG_DIR: ' \ '-c+[]:CONFIG_DIR:_files' \
'--config-dir=[]:CONFIG_DIR: ' \ '--config-dir=[]:CONFIG_DIR:_files' \
'-d+[]:DATA_DIR: ' \ '-d+[]:DATA_DIR:_files' \
'--data-dir=[]:DATA_DIR: ' \ '--data-dir=[]:DATA_DIR:_files' \
'--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]:BACKEND:(kernel userspace)' \ '--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]:BACKEND:(kernel userspace)' \
'--mtu=[Specify the desired MTU for your interface (default: 1280)]:MTU: ' \ '--mtu=[Specify the desired MTU for your interface (default\: 1280)]:MTU: ' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
'--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \ '--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_innernet-server_commands" \ ":: :_innernet-server_commands" \
"*::: :->innernet-server" \ "*::: :->innernet-server" \
&& ret=0 && ret=0
@ -37,30 +37,30 @@ _innernet-server() {
case $line[1] in case $line[1] in
(new) (new)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--network-name=[The network name (ex: evilcorp)]:NETWORK_NAME: ' \ '--network-name=[The network name (ex\: evilcorp)]:NETWORK_NAME: ' \
'--network-cidr=[The network CIDR (ex: 10.42.0.0/16)]:NETWORK_CIDR: ' \ '--network-cidr=[The network CIDR (ex\: 10.42.0.0/16)]:NETWORK_CIDR: ' \
'(--auto-external-endpoint)--external-endpoint=[This server'\''s external endpoint (ex: 100.100.100.100:51820)]:EXTERNAL_ENDPOINT: ' \ '(--auto-external-endpoint)--external-endpoint=[This server'\''s external endpoint (ex\: 100.100.100.100\:51820)]:EXTERNAL_ENDPOINT: ' \
'--listen-port=[Port to listen on (for the WireGuard interface)]:LISTEN_PORT: ' \ '--listen-port=[Port to listen on (for the WireGuard interface)]:LISTEN_PORT: ' \
'--auto-external-endpoint[Auto-resolve external endpoint]' \ '--auto-external-endpoint[Auto-resolve external endpoint]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
&& ret=0 && ret=0
;; ;;
(uninstall) (uninstall)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
(serve) (serve)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]:BACKEND:(kernel userspace)' \ '--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]:BACKEND:(kernel userspace)' \
'--mtu=[Specify the desired MTU for your interface (default: 1280)]:MTU: ' \ '--mtu=[Specify the desired MTU for your interface (default\: 1280)]:MTU: ' \
'--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \ '--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -69,27 +69,27 @@ _arguments "${_arguments_options[@]}" \
'--name=[Name of new peer]:NAME: ' \ '--name=[Name of new peer]:NAME: ' \
'(--auto-ip)--ip=[Specify desired IP of new peer (within parent CIDR)]:IP: ' \ '(--auto-ip)--ip=[Specify desired IP of new peer (within parent CIDR)]:IP: ' \
'--cidr=[Name of CIDR to add new peer under]:CIDR: ' \ '--cidr=[Name of CIDR to add new peer under]:CIDR: ' \
'--admin=[Make new peer an admin?]:ADMIN: ' \ '--admin=[Make new peer an admin?]:ADMIN:(true false)' \
'--save-config=[Save the config to the given location]:SAVE_CONFIG: ' \ '--save-config=[Save the config to the given location]:SAVE_CONFIG: ' \
'--invite-expires=[Invite expiration period (eg. '\''30d'\'', '\''7w'\'', '\''2h'\'', '\''60m'\'', '\''1000s'\'')]:INVITE_EXPIRES: ' \ '--invite-expires=[Invite expiration period (eg. '\''30d'\'', '\''7w'\'', '\''2h'\'', '\''60m'\'', '\''1000s'\'')]:INVITE_EXPIRES: ' \
'--auto-ip[Auto-assign the peer the first available IP within the CIDR]' \ '--auto-ip[Auto-assign the peer the first available IP within the CIDR]' \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
(disable-peer) (disable-peer)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
(enable-peer) (enable-peer)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -98,8 +98,8 @@ _arguments "${_arguments_options[@]}" \
'--name=[Name of peer to rename]:NAME: ' \ '--name=[Name of peer to rename]:NAME: ' \
'--new-name=[The new name of the peer]:NEW_NAME: ' \ '--new-name=[The new name of the peer]:NEW_NAME: ' \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -109,8 +109,8 @@ _arguments "${_arguments_options[@]}" \
'--cidr=[The CIDR network (eg. '\''10.42.5.0/24'\'')]:CIDR: ' \ '--cidr=[The CIDR network (eg. '\''10.42.5.0/24'\'')]:CIDR: ' \
'--parent=[The CIDR parent name]:PARENT: ' \ '--parent=[The CIDR parent name]:PARENT: ' \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -118,22 +118,77 @@ _arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--name=[The CIDR name (eg. '\''engineers'\'')]:NAME: ' \ '--name=[The CIDR name (eg. '\''engineers'\'')]:NAME: ' \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
(completions) (completions)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':shell:(bash elvish fish powershell zsh)' \ ':shell:(bash elvish fish powershell zsh)' \
&& ret=0 && ret=0
;; ;;
(help) (help)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \ ":: :_innernet-server__help_commands" \
"*::: :->help" \
&& ret=0 && ret=0
case $state in
(help)
words=($line[1] "${words[@]}")
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:innernet-server-help-command-$line[1]:"
case $line[1] in
(new)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(serve)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(add-peer)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(disable-peer)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(enable-peer)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(rename-peer)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(add-cidr)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(delete-cidr)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
esac
;;
esac
;; ;;
esac esac
;; ;;
@ -162,55 +217,126 @@ _innernet-server__add-cidr_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet-server add-cidr commands' commands "$@" _describe -t commands 'innernet-server add-cidr commands' commands "$@"
} }
(( $+functions[_innernet-server__help__add-cidr_commands] )) ||
_innernet-server__help__add-cidr_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help add-cidr commands' commands "$@"
}
(( $+functions[_innernet-server__add-peer_commands] )) || (( $+functions[_innernet-server__add-peer_commands] )) ||
_innernet-server__add-peer_commands() { _innernet-server__add-peer_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet-server add-peer commands' commands "$@" _describe -t commands 'innernet-server add-peer commands' commands "$@"
} }
(( $+functions[_innernet-server__help__add-peer_commands] )) ||
_innernet-server__help__add-peer_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help add-peer commands' commands "$@"
}
(( $+functions[_innernet-server__completions_commands] )) || (( $+functions[_innernet-server__completions_commands] )) ||
_innernet-server__completions_commands() { _innernet-server__completions_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet-server completions commands' commands "$@" _describe -t commands 'innernet-server completions commands' commands "$@"
} }
(( $+functions[_innernet-server__help__completions_commands] )) ||
_innernet-server__help__completions_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help completions commands' commands "$@"
}
(( $+functions[_innernet-server__delete-cidr_commands] )) || (( $+functions[_innernet-server__delete-cidr_commands] )) ||
_innernet-server__delete-cidr_commands() { _innernet-server__delete-cidr_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet-server delete-cidr commands' commands "$@" _describe -t commands 'innernet-server delete-cidr commands' commands "$@"
} }
(( $+functions[_innernet-server__help__delete-cidr_commands] )) ||
_innernet-server__help__delete-cidr_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help delete-cidr commands' commands "$@"
}
(( $+functions[_innernet-server__disable-peer_commands] )) || (( $+functions[_innernet-server__disable-peer_commands] )) ||
_innernet-server__disable-peer_commands() { _innernet-server__disable-peer_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet-server disable-peer commands' commands "$@" _describe -t commands 'innernet-server disable-peer commands' commands "$@"
} }
(( $+functions[_innernet-server__help__disable-peer_commands] )) ||
_innernet-server__help__disable-peer_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help disable-peer commands' commands "$@"
}
(( $+functions[_innernet-server__enable-peer_commands] )) || (( $+functions[_innernet-server__enable-peer_commands] )) ||
_innernet-server__enable-peer_commands() { _innernet-server__enable-peer_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet-server enable-peer commands' commands "$@" _describe -t commands 'innernet-server enable-peer commands' commands "$@"
} }
(( $+functions[_innernet-server__help__enable-peer_commands] )) ||
_innernet-server__help__enable-peer_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help enable-peer commands' commands "$@"
}
(( $+functions[_innernet-server__help_commands] )) || (( $+functions[_innernet-server__help_commands] )) ||
_innernet-server__help_commands() { _innernet-server__help_commands() {
local commands; commands=() local commands; commands=(
'new:Create a new network' \
'uninstall:Permanently uninstall a created network, rendering it unusable. Use with care' \
'serve:Serve the coordinating server for an existing network' \
'add-peer:Add a peer to an existing network' \
'disable-peer:Disable an enabled peer' \
'enable-peer:Enable a disabled peer' \
'rename-peer:Rename an existing peer' \
'add-cidr:Add a new CIDR to an existing network' \
'delete-cidr:Delete a CIDR' \
'completions:Generate shell completion scripts' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'innernet-server help commands' commands "$@" _describe -t commands 'innernet-server help commands' commands "$@"
} }
(( $+functions[_innernet-server__help__help_commands] )) ||
_innernet-server__help__help_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help help commands' commands "$@"
}
(( $+functions[_innernet-server__help__new_commands] )) ||
_innernet-server__help__new_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help new commands' commands "$@"
}
(( $+functions[_innernet-server__new_commands] )) || (( $+functions[_innernet-server__new_commands] )) ||
_innernet-server__new_commands() { _innernet-server__new_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet-server new commands' commands "$@" _describe -t commands 'innernet-server new commands' commands "$@"
} }
(( $+functions[_innernet-server__help__rename-peer_commands] )) ||
_innernet-server__help__rename-peer_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help rename-peer commands' commands "$@"
}
(( $+functions[_innernet-server__rename-peer_commands] )) || (( $+functions[_innernet-server__rename-peer_commands] )) ||
_innernet-server__rename-peer_commands() { _innernet-server__rename-peer_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet-server rename-peer commands' commands "$@" _describe -t commands 'innernet-server rename-peer commands' commands "$@"
} }
(( $+functions[_innernet-server__help__serve_commands] )) ||
_innernet-server__help__serve_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help serve commands' commands "$@"
}
(( $+functions[_innernet-server__serve_commands] )) || (( $+functions[_innernet-server__serve_commands] )) ||
_innernet-server__serve_commands() { _innernet-server__serve_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet-server serve commands' commands "$@" _describe -t commands 'innernet-server serve commands' commands "$@"
} }
(( $+functions[_innernet-server__help__uninstall_commands] )) ||
_innernet-server__help__uninstall_commands() {
local commands; commands=()
_describe -t commands 'innernet-server help uninstall commands' commands "$@"
}
(( $+functions[_innernet-server__uninstall_commands] )) || (( $+functions[_innernet-server__uninstall_commands] )) ||
_innernet-server__uninstall_commands() { _innernet-server__uninstall_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet-server uninstall commands' commands "$@" _describe -t commands 'innernet-server uninstall commands' commands "$@"
} }
if [ "$funcstack[1]" = "_innernet-server" ]; then
_innernet-server "$@" _innernet-server "$@"
else
compdef _innernet-server innernet-server
fi

View File

@ -1,43 +1,13 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH INNERNET "8" "September 2022" "innernet 1.5.5" "System Administration Utilities" .TH INNERNET "8" "June 2023" "innernet 1.6.0" "System Administration Utilities"
.SH NAME .SH NAME
innernet \- manual page for innernet 1.5.5 innernet \- manual page for innernet 1.6.0
.SH SYNOPSIS
.B innernet
[\fI\,OPTIONS\/\fR] [\fI\,COMMAND\/\fR]
.SH DESCRIPTION .SH DESCRIPTION
innernet 1.5.5
Jake McGinty <jake@tonari.no>
A client to manage innernet network interfaces. A client to manage innernet network interfaces.
.SS "USAGE:" .SS "Commands:"
.IP
innernet [OPTIONS] [SUBCOMMAND]
.SS "OPTIONS:"
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Verbose output, use \fB\-vv\fR for even higher verbositude
.TP
\fB\-c\fR, \fB\-\-config\-dir\fR <CONFIG_DIR>
[default: /etc/innernet]
.TP
\fB\-d\fR, \fB\-\-data\-dir\fR <DATA_DIR>
[default: /var/lib/innernet]
.TP
\fB\-\-no\-routing\fR
Whether the routing should be done by innernet or is done by an
external tool like e.g. babeld
.TP
\fB\-\-backend\fR <BACKEND>
Specify a WireGuard backend to use. If not set, innernet will
auto\-select based on availability [default: kernel] [possible
values: kernel, userspace]
.TP
\fB\-\-mtu\fR <MTU>
Specify the desired MTU for your interface (default: 1280)
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help information
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version information
.SS "SUBCOMMANDS:"
.TP .TP
install install
Install a new innernet config Install a new innernet config
@ -98,3 +68,31 @@ Generate shell completion scripts
.TP .TP
help help
Print this message or the help of the given subcommand(s) Print this message or the help of the given subcommand(s)
.SH OPTIONS
.TP
\fB\-v\fR, \fB\-\-verbose\fR...
Verbose output, use \fB\-vv\fR for even higher verbositude
.TP
\fB\-c\fR, \fB\-\-config\-dir\fR <CONFIG_DIR>
[default: /etc/innernet]
.TP
\fB\-d\fR, \fB\-\-data\-dir\fR <DATA_DIR>
[default: /var/lib/innernet]
.TP
\fB\-\-no\-routing\fR
Whether the routing should be done by innernet or is done by an
external tool like e.g. babeld
.TP
\fB\-\-backend\fR <BACKEND>
Specify a WireGuard backend to use. If not set, innernet will
auto\-select based on availability [default: kernel] [possible
values: kernel, userspace]
.TP
\fB\-\-mtu\fR <MTU>
Specify the desired MTU for your interface (default: 1280)
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version

Binary file not shown.

View File

@ -1,5 +1,5 @@
_innernet() { _innernet() {
local i cur prev opts cmds local i cur prev opts cmd
COMPREPLY=() COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}" cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}" prev="${COMP_WORDS[COMP_CWORD-1]}"
@ -8,69 +8,129 @@ _innernet() {
for i in ${COMP_WORDS[@]} for i in ${COMP_WORDS[@]}
do do
case "${i}" in case "${cmd},${i}" in
"$1") ",$1")
cmd="innernet" cmd="innernet"
;; ;;
add-association) innernet,add-association)
cmd+="__add__association" cmd="innernet__add__association"
;; ;;
add-cidr) innernet,add-cidr)
cmd+="__add__cidr" cmd="innernet__add__cidr"
;; ;;
add-peer) innernet,add-peer)
cmd+="__add__peer" cmd="innernet__add__peer"
;; ;;
completions) innernet,completions)
cmd+="__completions" cmd="innernet__completions"
;; ;;
delete-association) innernet,delete-association)
cmd+="__delete__association" cmd="innernet__delete__association"
;; ;;
delete-cidr) innernet,delete-cidr)
cmd+="__delete__cidr" cmd="innernet__delete__cidr"
;; ;;
disable-peer) innernet,disable-peer)
cmd+="__disable__peer" cmd="innernet__disable__peer"
;; ;;
down) innernet,down)
cmd+="__down" cmd="innernet__down"
;; ;;
enable-peer) innernet,enable-peer)
cmd+="__enable__peer" cmd="innernet__enable__peer"
;; ;;
fetch) innernet,fetch)
cmd+="__fetch" cmd="innernet__fetch"
;; ;;
help) innernet,help)
cmd+="__help" cmd="innernet__help"
;; ;;
install) innernet,install)
cmd+="__install" cmd="innernet__install"
;; ;;
list-associations) innernet,list-associations)
cmd+="__list__associations" cmd="innernet__list__associations"
;; ;;
list-cidrs) innernet,list-cidrs)
cmd+="__list__cidrs" cmd="innernet__list__cidrs"
;; ;;
override-endpoint) innernet,override-endpoint)
cmd+="__override__endpoint" cmd="innernet__override__endpoint"
;; ;;
rename-peer) innernet,rename-peer)
cmd+="__rename__peer" cmd="innernet__rename__peer"
;; ;;
set-listen-port) innernet,set-listen-port)
cmd+="__set__listen__port" cmd="innernet__set__listen__port"
;; ;;
show) innernet,show)
cmd+="__show" cmd="innernet__show"
;; ;;
uninstall) innernet,uninstall)
cmd+="__uninstall" cmd="innernet__uninstall"
;; ;;
up) innernet,up)
cmd+="__up" cmd="innernet__up"
;;
innernet__help,add-association)
cmd="innernet__help__add__association"
;;
innernet__help,add-cidr)
cmd="innernet__help__add__cidr"
;;
innernet__help,add-peer)
cmd="innernet__help__add__peer"
;;
innernet__help,completions)
cmd="innernet__help__completions"
;;
innernet__help,delete-association)
cmd="innernet__help__delete__association"
;;
innernet__help,delete-cidr)
cmd="innernet__help__delete__cidr"
;;
innernet__help,disable-peer)
cmd="innernet__help__disable__peer"
;;
innernet__help,down)
cmd="innernet__help__down"
;;
innernet__help,enable-peer)
cmd="innernet__help__enable__peer"
;;
innernet__help,fetch)
cmd="innernet__help__fetch"
;;
innernet__help,help)
cmd="innernet__help__help"
;;
innernet__help,install)
cmd="innernet__help__install"
;;
innernet__help,list-associations)
cmd="innernet__help__list__associations"
;;
innernet__help,list-cidrs)
cmd="innernet__help__list__cidrs"
;;
innernet__help,override-endpoint)
cmd="innernet__help__override__endpoint"
;;
innernet__help,rename-peer)
cmd="innernet__help__rename__peer"
;;
innernet__help,set-listen-port)
cmd="innernet__help__set__listen__port"
;;
innernet__help,show)
cmd="innernet__help__show"
;;
innernet__help,uninstall)
cmd="innernet__help__uninstall"
;;
innernet__help,up)
cmd="innernet__help__up"
;; ;;
*) *)
;; ;;
@ -79,7 +139,7 @@ _innernet() {
case "${cmd}" in case "${cmd}" in
innernet) innernet)
opts="-h -V -v -c -d --help --version --verbose --config-dir --data-dir --no-routing --backend --mtu install show up fetch uninstall down add-peer rename-peer add-cidr delete-cidr list-cidrs disable-peer enable-peer add-association delete-association list-associations set-listen-port override-endpoint completions help" opts="-v -c -d -h -V --verbose --config-dir --data-dir --no-routing --backend --mtu --help --version install show up fetch uninstall down add-peer rename-peer add-cidr delete-cidr list-cidrs disable-peer enable-peer add-association delete-association list-associations set-listen-port override-endpoint completions help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
@ -117,7 +177,7 @@ _innernet() {
return 0 return 0
;; ;;
innernet__add__association) innernet__add__association)
opts="-h --yes --help <INTERFACE> <CIDR1> <CIDR2>" opts="-h --yes --help <INTERFACE> [CIDR1] [CIDR2]"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
@ -176,7 +236,7 @@ _innernet() {
return 0 return 0
;; ;;
--admin) --admin)
COMPREPLY=($(compgen -f "${cur}")) COMPREPLY=($(compgen -W "true false" -- "${cur}"))
return 0 return 0
;; ;;
--save-config) --save-config)
@ -209,7 +269,7 @@ _innernet() {
return 0 return 0
;; ;;
innernet__delete__association) innernet__delete__association)
opts="-h --yes --help <INTERFACE> <CIDR1> <CIDR2>" opts="-h --yes --help <INTERFACE> [CIDR1] [CIDR2]"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
@ -305,7 +365,7 @@ _innernet() {
return 0 return 0
;; ;;
innernet__help) innernet__help)
opts="<SUBCOMMAND>..." opts="install show up fetch uninstall down add-peer rename-peer add-cidr delete-cidr list-cidrs disable-peer enable-peer add-association delete-association list-associations set-listen-port override-endpoint completions help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
@ -318,6 +378,286 @@ _innernet() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
;; ;;
innernet__help__add__association)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__add__cidr)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__add__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__completions)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__delete__association)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__delete__cidr)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__disable__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__down)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__enable__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__fetch)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__help)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__install)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__list__associations)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__list__cidrs)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__override__endpoint)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__rename__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__set__listen__port)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__show)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__uninstall)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__help__up)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__install) innernet__install)
opts="-d -h --hosts-path --no-write-hosts --name --default-name --delete-invite --no-nat-traversal --exclude-nat-candidates --no-nat-candidates --help <INVITE>" opts="-d -h --hosts-path --no-write-hosts --name --default-name --delete-invite --no-nat-traversal --exclude-nat-candidates --no-nat-candidates --help <INVITE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
@ -439,7 +779,7 @@ _innernet() {
return 0 return 0
;; ;;
innernet__show) innernet__show)
opts="-s -t -h --short --tree --help <INTERFACE>" opts="-s -t -h --short --tree --help [INTERFACE]"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
@ -467,7 +807,7 @@ _innernet() {
return 0 return 0
;; ;;
innernet__up) innernet__up)
opts="-d -h --daemon --interval --hosts-path --no-write-hosts --no-nat-traversal --exclude-nat-candidates --no-nat-candidates --help <INTERFACE>" opts="-d -h --daemon --interval --hosts-path --no-write-hosts --no-nat-traversal --exclude-nat-candidates --no-nat-candidates --help [INTERFACE]"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0

View File

@ -24,13 +24,13 @@ set edit:completion:arg-completer[innernet] = {|@words|
cand --data-dir 'data-dir' cand --data-dir 'data-dir'
cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability'
cand --mtu 'Specify the desired MTU for your interface (default: 1280)' cand --mtu 'Specify the desired MTU for your interface (default: 1280)'
cand -h 'Print help information'
cand --help 'Print help information'
cand -V 'Print version information'
cand --version 'Print version information'
cand -v 'Verbose output, use -vv for even higher verbositude' cand -v 'Verbose output, use -vv for even higher verbositude'
cand --verbose '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 --no-routing 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
cand -h 'Print help'
cand --help 'Print help'
cand -V 'Print version'
cand --version 'Print version'
cand install 'Install a new innernet config' cand install 'Install a new innernet config'
cand show 'Enumerate all innernet connections' cand show 'Enumerate all innernet connections'
cand up 'Bring up your local interface, and update it with latest peer list' cand up 'Bring up your local interface, and update it with latest peer list'
@ -62,16 +62,16 @@ set edit:completion:arg-completer[innernet] = {|@words|
cand --delete-invite 'Delete the invitation after a successful install' cand --delete-invite 'Delete the invitation after a successful install'
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-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 --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0'''
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;show'= { &'innernet;show'= {
cand -s 'One-line peer list' cand -s 'One-line peer list'
cand --short 'One-line peer list' cand --short 'One-line peer list'
cand -t 'Display peers in a tree based on the CIDRs' cand -t 'Display peers in a tree based on the CIDRs'
cand --tree 'Display peers in a tree based on the CIDRs' cand --tree 'Display peers in a tree based on the CIDRs'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;up'= { &'innernet;up'= {
cand --interval 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode' cand --interval 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode'
@ -82,8 +82,8 @@ set edit:completion:arg-completer[innernet] = {|@words|
cand --no-write-hosts 'Don''t write to any hosts files' cand --no-write-hosts 'Don''t write to any hosts files'
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-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 --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0'''
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;fetch'= { &'innernet;fetch'= {
cand --hosts-path 'The path to write hosts to' cand --hosts-path 'The path to write hosts to'
@ -91,17 +91,17 @@ set edit:completion:arg-completer[innernet] = {|@words|
cand --no-write-hosts 'Don''t write to any hosts files' cand --no-write-hosts 'Don''t write to any hosts files'
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-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 --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0'''
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;uninstall'= { &'innernet;uninstall'= {
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;down'= { &'innernet;down'= {
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;add-peer'= { &'innernet;add-peer'= {
cand --name 'Name of new peer' cand --name 'Name of new peer'
@ -112,57 +112,57 @@ set edit:completion:arg-completer[innernet] = {|@words|
cand --invite-expires 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')' 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 --auto-ip 'Auto-assign the peer the first available IP within the CIDR'
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help (see more with ''--help'')'
cand --help 'Print help information' cand --help 'Print help (see more with ''--help'')'
} }
&'innernet;rename-peer'= { &'innernet;rename-peer'= {
cand --name 'Name of peer to rename' cand --name 'Name of peer to rename'
cand --new-name 'The new name of the peer' cand --new-name 'The new name of the peer'
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help (see more with ''--help'')'
cand --help 'Print help information' cand --help 'Print help (see more with ''--help'')'
} }
&'innernet;add-cidr'= { &'innernet;add-cidr'= {
cand --name 'The CIDR name (eg. ''engineers'')' cand --name 'The CIDR name (eg. ''engineers'')'
cand --cidr 'The CIDR network (eg. ''10.42.5.0/24'')' cand --cidr 'The CIDR network (eg. ''10.42.5.0/24'')'
cand --parent 'The CIDR parent name' cand --parent 'The CIDR parent name'
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;delete-cidr'= { &'innernet;delete-cidr'= {
cand --name 'The CIDR name (eg. ''engineers'')' cand --name 'The CIDR name (eg. ''engineers'')'
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;list-cidrs'= { &'innernet;list-cidrs'= {
cand -t 'Display CIDRs in tree format' cand -t 'Display CIDRs in tree format'
cand --tree 'Display CIDRs in tree format' cand --tree 'Display CIDRs in tree format'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;disable-peer'= { &'innernet;disable-peer'= {
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;enable-peer'= { &'innernet;enable-peer'= {
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;add-association'= { &'innernet;add-association'= {
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;delete-association'= { &'innernet;delete-association'= {
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;list-associations'= { &'innernet;list-associations'= {
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;set-listen-port'= { &'innernet;set-listen-port'= {
cand -l 'The listen port you''d like to set for the interface' cand -l 'The listen port you''d like to set for the interface'
@ -170,8 +170,8 @@ set edit:completion:arg-completer[innernet] = {|@words|
cand -u 'Unset the local listen port to use a randomized port' cand -u 'Unset the local listen port to use a randomized port'
cand --unset 'Unset the local listen port to use a randomized port' cand --unset 'Unset the local listen port to use a randomized port'
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;override-endpoint'= { &'innernet;override-endpoint'= {
cand -e 'The listen port you''d like to set for the interface' cand -e 'The listen port you''d like to set for the interface'
@ -179,14 +179,74 @@ set edit:completion:arg-completer[innernet] = {|@words|
cand -u 'Unset an existing override to use the automatic endpoint discovery' cand -u 'Unset an existing override to use the automatic endpoint discovery'
cand --unset 'Unset an existing override to use the automatic endpoint discovery' cand --unset 'Unset an existing override to use the automatic endpoint discovery'
cand --yes 'Bypass confirmation' cand --yes 'Bypass confirmation'
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;completions'= { &'innernet;completions'= {
cand -h 'Print help information' cand -h 'Print help'
cand --help 'Print help information' cand --help 'Print help'
} }
&'innernet;help'= { &'innernet;help'= {
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'
cand down 'Bring down the interface (equivalent to ''wg-quick down <interface>'')'
cand add-peer 'Add a new peer'
cand rename-peer 'Rename a peer'
cand add-cidr 'Add a new CIDR'
cand delete-cidr 'Delete a CIDR'
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 'Print this message or the help of the given subcommand(s)'
}
&'innernet;help;install'= {
}
&'innernet;help;show'= {
}
&'innernet;help;up'= {
}
&'innernet;help;fetch'= {
}
&'innernet;help;uninstall'= {
}
&'innernet;help;down'= {
}
&'innernet;help;add-peer'= {
}
&'innernet;help;rename-peer'= {
}
&'innernet;help;add-cidr'= {
}
&'innernet;help;delete-cidr'= {
}
&'innernet;help;list-cidrs'= {
}
&'innernet;help;disable-peer'= {
}
&'innernet;help;enable-peer'= {
}
&'innernet;help;add-association'= {
}
&'innernet;help;delete-association'= {
}
&'innernet;help;list-associations'= {
}
&'innernet;help;set-listen-port'= {
}
&'innernet;help;override-endpoint'= {
}
&'innernet;help;completions'= {
}
&'innernet;help;help'= {
} }
] ]
$completions[$command] $completions[$command]

View File

@ -1,11 +1,11 @@
complete -c innernet -n "__fish_use_subcommand" -s c -l config-dir -r complete -c innernet -n "__fish_use_subcommand" -s c -l config-dir -r -F
complete -c innernet -n "__fish_use_subcommand" -s d -l data-dir -r complete -c innernet -n "__fish_use_subcommand" -s d -l data-dir -r -F
complete -c innernet -n "__fish_use_subcommand" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "{kernel ,userspace }" complete -c innernet -n "__fish_use_subcommand" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "{kernel ,userspace }"
complete -c innernet -n "__fish_use_subcommand" -l mtu -d 'Specify the desired MTU for your interface (default: 1280)' -r complete -c innernet -n "__fish_use_subcommand" -l mtu -d 'Specify the desired MTU for your interface (default: 1280)' -r
complete -c innernet -n "__fish_use_subcommand" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_use_subcommand" -s V -l version -d 'Print version information'
complete -c innernet -n "__fish_use_subcommand" -s v -l verbose -d 'Verbose output, use -vv for even higher verbositude' complete -c innernet -n "__fish_use_subcommand" -s v -l verbose -d 'Verbose output, use -vv for even higher verbositude'
complete -c innernet -n "__fish_use_subcommand" -l no-routing -d 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld' complete -c innernet -n "__fish_use_subcommand" -l no-routing -d 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
complete -c innernet -n "__fish_use_subcommand" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_use_subcommand" -s V -l version -d 'Print version'
complete -c innernet -n "__fish_use_subcommand" -f -a "install" -d 'Install a new innernet config' complete -c innernet -n "__fish_use_subcommand" -f -a "install" -d 'Install a new innernet config'
complete -c innernet -n "__fish_use_subcommand" -f -a "show" -d 'Enumerate all innernet connections' complete -c innernet -n "__fish_use_subcommand" -f -a "show" -d 'Enumerate all innernet connections'
complete -c innernet -n "__fish_use_subcommand" -f -a "up" -d 'Bring up your local interface, and update it with latest peer list' complete -c innernet -n "__fish_use_subcommand" -f -a "up" -d 'Bring up your local interface, and update it with latest peer list'
@ -26,7 +26,7 @@ complete -c innernet -n "__fish_use_subcommand" -f -a "set-listen-port" -d 'Set
complete -c innernet -n "__fish_use_subcommand" -f -a "override-endpoint" -d 'Override your external endpoint that the server sends to other peers' complete -c innernet -n "__fish_use_subcommand" -f -a "override-endpoint" -d 'Override your external endpoint that the server sends to other peers'
complete -c innernet -n "__fish_use_subcommand" -f -a "completions" -d 'Generate shell completion scripts' complete -c innernet -n "__fish_use_subcommand" -f -a "completions" -d 'Generate shell completion scripts'
complete -c innernet -n "__fish_use_subcommand" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c innernet -n "__fish_use_subcommand" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c innernet -n "__fish_seen_subcommand_from install" -l hosts-path -d 'The path to write hosts to' -r complete -c innernet -n "__fish_seen_subcommand_from install" -l hosts-path -d 'The path to write hosts to' -r -F
complete -c innernet -n "__fish_seen_subcommand_from install" -l name -d 'Set a specific interface name' -r complete -c innernet -n "__fish_seen_subcommand_from install" -l name -d 'Set a specific interface name' -r
complete -c innernet -n "__fish_seen_subcommand_from install" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' -r complete -c innernet -n "__fish_seen_subcommand_from install" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' -r
complete -c innernet -n "__fish_seen_subcommand_from install" -l no-write-hosts -d 'Don\'t write to any hosts files' complete -c innernet -n "__fish_seen_subcommand_from install" -l no-write-hosts -d 'Don\'t write to any hosts files'
@ -34,63 +34,83 @@ complete -c innernet -n "__fish_seen_subcommand_from install" -l default-name -d
complete -c innernet -n "__fish_seen_subcommand_from install" -s d -l delete-invite -d 'Delete the invitation after a successful install' complete -c innernet -n "__fish_seen_subcommand_from install" -s d -l delete-invite -d 'Delete the invitation after a successful install'
complete -c innernet -n "__fish_seen_subcommand_from install" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates' complete -c innernet -n "__fish_seen_subcommand_from install" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
complete -c innernet -n "__fish_seen_subcommand_from install" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\'' complete -c innernet -n "__fish_seen_subcommand_from install" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\''
complete -c innernet -n "__fish_seen_subcommand_from install" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from install" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from show" -s s -l short -d 'One-line peer list' complete -c innernet -n "__fish_seen_subcommand_from show" -s s -l short -d 'One-line peer list'
complete -c innernet -n "__fish_seen_subcommand_from show" -s t -l tree -d 'Display peers in a tree based on the CIDRs' complete -c innernet -n "__fish_seen_subcommand_from show" -s t -l tree -d 'Display peers in a tree based on the CIDRs'
complete -c innernet -n "__fish_seen_subcommand_from show" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from show" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from up" -l interval -d 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode' -r complete -c innernet -n "__fish_seen_subcommand_from up" -l interval -d 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode' -r
complete -c innernet -n "__fish_seen_subcommand_from up" -l hosts-path -d 'The path to write hosts to' -r complete -c innernet -n "__fish_seen_subcommand_from up" -l hosts-path -d 'The path to write hosts to' -r -F
complete -c innernet -n "__fish_seen_subcommand_from up" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' -r complete -c innernet -n "__fish_seen_subcommand_from up" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' -r
complete -c innernet -n "__fish_seen_subcommand_from up" -s d -l daemon -d 'Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically' complete -c innernet -n "__fish_seen_subcommand_from up" -s d -l daemon -d 'Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically'
complete -c innernet -n "__fish_seen_subcommand_from up" -l no-write-hosts -d 'Don\'t write to any hosts files' complete -c innernet -n "__fish_seen_subcommand_from up" -l no-write-hosts -d 'Don\'t write to any hosts files'
complete -c innernet -n "__fish_seen_subcommand_from up" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates' complete -c innernet -n "__fish_seen_subcommand_from up" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
complete -c innernet -n "__fish_seen_subcommand_from up" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\'' complete -c innernet -n "__fish_seen_subcommand_from up" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\''
complete -c innernet -n "__fish_seen_subcommand_from up" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from up" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l hosts-path -d 'The path to write hosts to' -r complete -c innernet -n "__fish_seen_subcommand_from fetch" -l hosts-path -d 'The path to write hosts to' -r -F
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' -r complete -c innernet -n "__fish_seen_subcommand_from fetch" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' -r
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-write-hosts -d 'Don\'t write to any hosts files' complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-write-hosts -d 'Don\'t write to any hosts files'
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates' complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\'' complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\''
complete -c innernet -n "__fish_seen_subcommand_from fetch" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from fetch" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from uninstall" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from uninstall" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from down" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from down" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l name -d 'Name of new peer' -r complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l name -d 'Name of new peer' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l ip -d 'Specify desired IP of new peer (within parent CIDR)' -r complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l ip -d 'Specify desired IP of new peer (within parent CIDR)' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l cidr -d 'Name of CIDR to add new peer under' -r complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l cidr -d 'Name of CIDR to add new peer under' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l admin -d 'Make new peer an admin?' -r complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l admin -d 'Make new peer an admin?' -r -f -a "{true ,false }"
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l save-config -d 'Save the config to the given location' -r complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l save-config -d 'Save the config to the given location' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l invite-expires -d 'Invite expiration period (eg. \'30d\', \'7w\', \'2h\', \'60m\', \'1000s\')' -r complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l invite-expires -d 'Invite expiration period (eg. \'30d\', \'7w\', \'2h\', \'60m\', \'1000s\')' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l auto-ip -d 'Auto-assign the peer the first available IP within the CIDR' complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l auto-ip -d 'Auto-assign the peer the first available IP within the CIDR'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Print help (see more with \'--help\')'
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename' -r complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename' -r
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer' -r complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer' -r
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Print help (see more with \'--help\')'
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l cidr -d 'The CIDR network (eg. \'10.42.5.0/24\')' -r complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l cidr -d 'The CIDR network (eg. \'10.42.5.0/24\')' -r
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l parent -d 'The CIDR parent name' -r complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l parent -d 'The CIDR parent name' -r
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r
complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from list-cidrs" -s t -l tree -d 'Display CIDRs in tree format' complete -c innernet -n "__fish_seen_subcommand_from list-cidrs" -s t -l tree -d 'Display CIDRs in tree format'
complete -c innernet -n "__fish_seen_subcommand_from list-cidrs" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from list-cidrs" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from disable-peer" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from disable-peer" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from enable-peer" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from enable-peer" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from add-association" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from add-association" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from add-association" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from add-association" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from delete-association" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from delete-association" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from delete-association" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from delete-association" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from list-associations" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from list-associations" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s l -l listen-port -d 'The listen port you\'d like to set for the interface' -r complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s l -l listen-port -d 'The listen port you\'d like to set for the interface' -r
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s u -l unset -d 'Unset the local listen port to use a randomized port' complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s u -l unset -d 'Unset the local listen port to use a randomized port'
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s e -l endpoint -d 'The listen port you\'d like to set for the interface' -r complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s e -l endpoint -d 'The listen port you\'d like to set for the interface' -r
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s u -l unset -d 'Unset an existing override to use the automatic endpoint discovery' complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s u -l unset -d 'Unset an existing override to use the automatic endpoint discovery'
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Print help information' complete -c innernet -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Print help'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "install" -d 'Install a new innernet config'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "show" -d 'Enumerate all innernet connections'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "up" -d 'Bring up your local interface, and update it with latest peer list'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "fetch" -d 'Fetch and update your local interface with the latest peer list'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "uninstall" -d 'Uninstall an innernet network'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "down" -d 'Bring down the interface (equivalent to \'wg-quick down <interface>\')'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "add-peer" -d 'Add a new peer'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "rename-peer" -d 'Rename a peer'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "add-cidr" -d 'Add a new CIDR'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "delete-cidr" -d 'Delete a CIDR'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "list-cidrs" -d 'List CIDRs'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "disable-peer" -d 'Disable an enabled peer'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "enable-peer" -d 'Enable a disabled peer'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "add-association" -d 'Add an association between CIDRs'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "delete-association" -d 'Delete an association between CIDRs'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "list-associations" -d 'List existing assocations between CIDRs'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "set-listen-port" -d 'Set the local listen port'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "override-endpoint" -d 'Override your external endpoint that the server sends to other peers'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "completions" -d 'Generate shell completion scripts'
complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'

View File

@ -27,13 +27,13 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'data-dir') [CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'data-dir')
[CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability') [CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability')
[CompletionResult]::new('--mtu', 'mtu', [CompletionResultType]::ParameterName, 'Specify the desired MTU for your interface (default: 1280)') [CompletionResult]::new('--mtu', 'mtu', [CompletionResultType]::ParameterName, 'Specify the desired MTU for your interface (default: 1280)')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version information')
[CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'Verbose output, use -vv for even higher verbositude') [CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'Verbose output, use -vv for even higher verbositude')
[CompletionResult]::new('--verbose', 'verbose', [CompletionResultType]::ParameterName, 'Verbose output, use -vv for even higher verbositude') [CompletionResult]::new('--verbose', 'verbose', [CompletionResultType]::ParameterName, 'Verbose output, use -vv for even higher verbositude')
[CompletionResult]::new('--no-routing', 'no-routing', [CompletionResultType]::ParameterName, 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld') [CompletionResult]::new('--no-routing', 'no-routing', [CompletionResultType]::ParameterName, 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version')
[CompletionResult]::new('install', 'install', [CompletionResultType]::ParameterValue, 'Install a new innernet config') [CompletionResult]::new('install', 'install', [CompletionResultType]::ParameterValue, 'Install a new innernet config')
[CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Enumerate all innernet connections') [CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Enumerate all innernet connections')
[CompletionResult]::new('up', 'up', [CompletionResultType]::ParameterValue, 'Bring up your local interface, and update it with latest peer list') [CompletionResult]::new('up', 'up', [CompletionResultType]::ParameterValue, 'Bring up your local interface, and update it with latest peer list')
@ -66,8 +66,8 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--delete-invite', 'delete-invite', [CompletionResultType]::ParameterName, 'Delete the invitation after a successful install') [CompletionResult]::new('--delete-invite', 'delete-invite', [CompletionResultType]::ParameterName, 'Delete the invitation after a successful install')
[CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates') [CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates')
[CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''') [CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;show' { 'innernet;show' {
@ -75,8 +75,8 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--short', 'short', [CompletionResultType]::ParameterName, 'One-line peer list') [CompletionResult]::new('--short', 'short', [CompletionResultType]::ParameterName, 'One-line peer list')
[CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Display peers in a tree based on the CIDRs') [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Display peers in a tree based on the CIDRs')
[CompletionResult]::new('--tree', 'tree', [CompletionResultType]::ParameterName, 'Display peers in a tree based on the CIDRs') [CompletionResult]::new('--tree', 'tree', [CompletionResultType]::ParameterName, 'Display peers in a tree based on the CIDRs')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;up' { 'innernet;up' {
@ -88,8 +88,8 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--no-write-hosts', 'no-write-hosts', [CompletionResultType]::ParameterName, 'Don''t write to any hosts files') [CompletionResult]::new('--no-write-hosts', 'no-write-hosts', [CompletionResultType]::ParameterName, 'Don''t write to any hosts files')
[CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates') [CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates')
[CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''') [CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;fetch' { 'innernet;fetch' {
@ -98,19 +98,19 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--no-write-hosts', 'no-write-hosts', [CompletionResultType]::ParameterName, 'Don''t write to any hosts files') [CompletionResult]::new('--no-write-hosts', 'no-write-hosts', [CompletionResultType]::ParameterName, 'Don''t write to any hosts files')
[CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates') [CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates')
[CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''') [CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;uninstall' { 'innernet;uninstall' {
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;down' { 'innernet;down' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;add-peer' { 'innernet;add-peer' {
@ -122,16 +122,16 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--invite-expires', 'invite-expires', [CompletionResultType]::ParameterName, 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')') [CompletionResult]::new('--invite-expires', 'invite-expires', [CompletionResultType]::ParameterName, 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')')
[CompletionResult]::new('--auto-ip', 'auto-ip', [CompletionResultType]::ParameterName, 'Auto-assign the peer the first available IP within the CIDR') [CompletionResult]::new('--auto-ip', 'auto-ip', [CompletionResultType]::ParameterName, 'Auto-assign the peer the first available IP within the CIDR')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
break break
} }
'innernet;rename-peer' { 'innernet;rename-peer' {
[CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Name of peer to rename') [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Name of peer to rename')
[CompletionResult]::new('--new-name', 'new-name', [CompletionResultType]::ParameterName, 'The new name of the peer') [CompletionResult]::new('--new-name', 'new-name', [CompletionResultType]::ParameterName, 'The new name of the peer')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
break break
} }
'innernet;add-cidr' { 'innernet;add-cidr' {
@ -139,49 +139,49 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--cidr', 'cidr', [CompletionResultType]::ParameterName, 'The CIDR network (eg. ''10.42.5.0/24'')') [CompletionResult]::new('--cidr', 'cidr', [CompletionResultType]::ParameterName, 'The CIDR network (eg. ''10.42.5.0/24'')')
[CompletionResult]::new('--parent', 'parent', [CompletionResultType]::ParameterName, 'The CIDR parent name') [CompletionResult]::new('--parent', 'parent', [CompletionResultType]::ParameterName, 'The CIDR parent name')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;delete-cidr' { 'innernet;delete-cidr' {
[CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'The CIDR name (eg. ''engineers'')') [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'The CIDR name (eg. ''engineers'')')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;list-cidrs' { 'innernet;list-cidrs' {
[CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Display CIDRs in tree format') [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Display CIDRs in tree format')
[CompletionResult]::new('--tree', 'tree', [CompletionResultType]::ParameterName, 'Display CIDRs in tree format') [CompletionResult]::new('--tree', 'tree', [CompletionResultType]::ParameterName, 'Display CIDRs in tree format')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;disable-peer' { 'innernet;disable-peer' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;enable-peer' { 'innernet;enable-peer' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;add-association' { 'innernet;add-association' {
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;delete-association' { 'innernet;delete-association' {
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;list-associations' { 'innernet;list-associations' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;set-listen-port' { 'innernet;set-listen-port' {
@ -190,8 +190,8 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Unset the local listen port to use a randomized port') [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Unset the local listen port to use a randomized port')
[CompletionResult]::new('--unset', 'unset', [CompletionResultType]::ParameterName, 'Unset the local listen port to use a randomized port') [CompletionResult]::new('--unset', 'unset', [CompletionResultType]::ParameterName, 'Unset the local listen port to use a randomized port')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;override-endpoint' { 'innernet;override-endpoint' {
@ -200,16 +200,96 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Unset an existing override to use the automatic endpoint discovery') [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Unset an existing override to use the automatic endpoint discovery')
[CompletionResult]::new('--unset', 'unset', [CompletionResultType]::ParameterName, 'Unset an existing override to use the automatic endpoint discovery') [CompletionResult]::new('--unset', 'unset', [CompletionResultType]::ParameterName, 'Unset an existing override to use the automatic endpoint discovery')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;completions' { 'innernet;completions' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help')
break break
} }
'innernet;help' { 'innernet;help' {
[CompletionResult]::new('install', 'install', [CompletionResultType]::ParameterValue, 'Install a new innernet config')
[CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Enumerate all innernet connections')
[CompletionResult]::new('up', 'up', [CompletionResultType]::ParameterValue, 'Bring up your local interface, and update it with latest peer list')
[CompletionResult]::new('fetch', 'fetch', [CompletionResultType]::ParameterValue, 'Fetch and update your local interface with the latest peer list')
[CompletionResult]::new('uninstall', 'uninstall', [CompletionResultType]::ParameterValue, 'Uninstall an innernet network')
[CompletionResult]::new('down', 'down', [CompletionResultType]::ParameterValue, 'Bring down the interface (equivalent to ''wg-quick down <interface>'')')
[CompletionResult]::new('add-peer', 'add-peer', [CompletionResultType]::ParameterValue, 'Add a new peer')
[CompletionResult]::new('rename-peer', 'rename-peer', [CompletionResultType]::ParameterValue, 'Rename a peer')
[CompletionResult]::new('add-cidr', 'add-cidr', [CompletionResultType]::ParameterValue, 'Add a new CIDR')
[CompletionResult]::new('delete-cidr', 'delete-cidr', [CompletionResultType]::ParameterValue, 'Delete a CIDR')
[CompletionResult]::new('list-cidrs', 'list-cidrs', [CompletionResultType]::ParameterValue, 'List CIDRs')
[CompletionResult]::new('disable-peer', 'disable-peer', [CompletionResultType]::ParameterValue, 'Disable an enabled peer')
[CompletionResult]::new('enable-peer', 'enable-peer', [CompletionResultType]::ParameterValue, 'Enable a disabled peer')
[CompletionResult]::new('add-association', 'add-association', [CompletionResultType]::ParameterValue, 'Add an association between CIDRs')
[CompletionResult]::new('delete-association', 'delete-association', [CompletionResultType]::ParameterValue, 'Delete an association between CIDRs')
[CompletionResult]::new('list-associations', 'list-associations', [CompletionResultType]::ParameterValue, 'List existing assocations between CIDRs')
[CompletionResult]::new('set-listen-port', 'set-listen-port', [CompletionResultType]::ParameterValue, 'Set the local listen port')
[CompletionResult]::new('override-endpoint', 'override-endpoint', [CompletionResultType]::ParameterValue, 'Override your external endpoint that the server sends to other peers')
[CompletionResult]::new('completions', 'completions', [CompletionResultType]::ParameterValue, 'Generate shell completion scripts')
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
break
}
'innernet;help;install' {
break
}
'innernet;help;show' {
break
}
'innernet;help;up' {
break
}
'innernet;help;fetch' {
break
}
'innernet;help;uninstall' {
break
}
'innernet;help;down' {
break
}
'innernet;help;add-peer' {
break
}
'innernet;help;rename-peer' {
break
}
'innernet;help;add-cidr' {
break
}
'innernet;help;delete-cidr' {
break
}
'innernet;help;list-cidrs' {
break
}
'innernet;help;disable-peer' {
break
}
'innernet;help;enable-peer' {
break
}
'innernet;help;add-association' {
break
}
'innernet;help;delete-association' {
break
}
'innernet;help;list-associations' {
break
}
'innernet;help;set-listen-port' {
break
}
'innernet;help;override-endpoint' {
break
}
'innernet;help;completions' {
break
}
'innernet;help;help' {
break break
} }
}) })

View File

@ -15,19 +15,19 @@ _innernet() {
local context curcontext="$curcontext" state line local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-c+[]:CONFIG_DIR: ' \ '-c+[]:CONFIG_DIR:_files' \
'--config-dir=[]:CONFIG_DIR: ' \ '--config-dir=[]:CONFIG_DIR:_files' \
'-d+[]:DATA_DIR: ' \ '-d+[]:DATA_DIR:_files' \
'--data-dir=[]:DATA_DIR: ' \ '--data-dir=[]:DATA_DIR:_files' \
'--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]:BACKEND:(kernel userspace)' \ '--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]:BACKEND:(kernel userspace)' \
'--mtu=[Specify the desired MTU for your interface (default: 1280)]:MTU: ' \ '--mtu=[Specify the desired MTU for your interface (default\: 1280)]:MTU: ' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
'*-v[Verbose output, use -vv for even higher verbositude]' \ '*-v[Verbose output, use -vv for even higher verbositude]' \
'*--verbose[Verbose output, use -vv for even higher verbositude]' \ '*--verbose[Verbose output, use -vv for even higher verbositude]' \
'--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \ '--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_innernet_commands" \ ":: :_innernet_commands" \
"*::: :->innernet" \ "*::: :->innernet" \
&& ret=0 && ret=0
@ -39,7 +39,7 @@ _innernet() {
case $line[1] in case $line[1] in
(install) (install)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--hosts-path=[The path to write hosts to]:HOSTS_PATH: ' \ '--hosts-path=[The path to write hosts to]:HOSTS_PATH:_files' \
'(--default-name)--name=[Set a specific interface name]:NAME: ' \ '(--default-name)--name=[Set a specific interface name]:NAME: ' \
'*--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]:EXCLUDE_NAT_CANDIDATES: ' \ '*--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]:EXCLUDE_NAT_CANDIDATES: ' \
'(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \ '(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \
@ -48,9 +48,9 @@ _arguments "${_arguments_options[@]}" \
'--delete-invite[Delete the invitation after a successful install]' \ '--delete-invite[Delete the invitation after a successful install]' \
'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \ '--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \
'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \ '(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':invite -- Path to the invitation file:' \ ':invite -- Path to the invitation file:_files' \
&& ret=0 && ret=0
;; ;;
(show) (show)
@ -59,50 +59,50 @@ _arguments "${_arguments_options[@]}" \
'--short[One-line peer list]' \ '--short[One-line peer list]' \
'-t[Display peers in a tree based on the CIDRs]' \ '-t[Display peers in a tree based on the CIDRs]' \
'--tree[Display peers in a tree based on the CIDRs]' \ '--tree[Display peers in a tree based on the CIDRs]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
'::interface:' \ '::interface:' \
&& ret=0 && ret=0
;; ;;
(up) (up)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--interval=[Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode]:INTERVAL: ' \ '--interval=[Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode]:INTERVAL: ' \
'--hosts-path=[The path to write hosts to]:HOSTS_PATH: ' \ '--hosts-path=[The path to write hosts to]:HOSTS_PATH:_files' \
'*--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]:EXCLUDE_NAT_CANDIDATES: ' \ '*--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]:EXCLUDE_NAT_CANDIDATES: ' \
'-d[Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically]' \ '-d[Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically]' \
'--daemon[Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically]' \ '--daemon[Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically]' \
'(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \ '(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \
'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \ '--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \
'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \ '(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
'::interface:' \ '::interface:' \
&& ret=0 && ret=0
;; ;;
(fetch) (fetch)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--hosts-path=[The path to write hosts to]:HOSTS_PATH: ' \ '--hosts-path=[The path to write hosts to]:HOSTS_PATH:_files' \
'*--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]:EXCLUDE_NAT_CANDIDATES: ' \ '*--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]:EXCLUDE_NAT_CANDIDATES: ' \
'(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \ '(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \
'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \ '--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \
'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \ '(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
(uninstall) (uninstall)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
(down) (down)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -111,13 +111,13 @@ _arguments "${_arguments_options[@]}" \
'--name=[Name of new peer]:NAME: ' \ '--name=[Name of new peer]:NAME: ' \
'(--auto-ip)--ip=[Specify desired IP of new peer (within parent CIDR)]:IP: ' \ '(--auto-ip)--ip=[Specify desired IP of new peer (within parent CIDR)]:IP: ' \
'--cidr=[Name of CIDR to add new peer under]:CIDR: ' \ '--cidr=[Name of CIDR to add new peer under]:CIDR: ' \
'--admin=[Make new peer an admin?]:ADMIN: ' \ '--admin=[Make new peer an admin?]:ADMIN:(true false)' \
'--save-config=[Save the config to the given location]:SAVE_CONFIG: ' \ '--save-config=[Save the config to the given location]:SAVE_CONFIG: ' \
'--invite-expires=[Invite expiration period (eg. '\''30d'\'', '\''7w'\'', '\''2h'\'', '\''60m'\'', '\''1000s'\'')]:INVITE_EXPIRES: ' \ '--invite-expires=[Invite expiration period (eg. '\''30d'\'', '\''7w'\'', '\''2h'\'', '\''60m'\'', '\''1000s'\'')]:INVITE_EXPIRES: ' \
'--auto-ip[Auto-assign the peer the first available IP within the CIDR]' \ '--auto-ip[Auto-assign the peer the first available IP within the CIDR]' \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help information]' \ '--help[Print help (see more with '\''--help'\'')]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -126,8 +126,8 @@ _arguments "${_arguments_options[@]}" \
'--name=[Name of peer to rename]:NAME: ' \ '--name=[Name of peer to rename]:NAME: ' \
'--new-name=[The new name of the peer]:NEW_NAME: ' \ '--new-name=[The new name of the peer]:NEW_NAME: ' \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help information]' \ '--help[Print help (see more with '\''--help'\'')]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -137,8 +137,8 @@ _arguments "${_arguments_options[@]}" \
'--cidr=[The CIDR network (eg. '\''10.42.5.0/24'\'')]:CIDR: ' \ '--cidr=[The CIDR network (eg. '\''10.42.5.0/24'\'')]:CIDR: ' \
'--parent=[The CIDR parent name]:PARENT: ' \ '--parent=[The CIDR parent name]:PARENT: ' \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -146,8 +146,8 @@ _arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--name=[The CIDR name (eg. '\''engineers'\'')]:NAME: ' \ '--name=[The CIDR name (eg. '\''engineers'\'')]:NAME: ' \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -155,30 +155,30 @@ _arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-t[Display CIDRs in tree format]' \ '-t[Display CIDRs in tree format]' \
'--tree[Display CIDRs in tree format]' \ '--tree[Display CIDRs in tree format]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
(disable-peer) (disable-peer)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
(enable-peer) (enable-peer)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
(add-association) (add-association)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
'::cidr1 -- The first cidr to associate:' \ '::cidr1 -- The first cidr to associate:' \
'::cidr2 -- The second cidr to associate:' \ '::cidr2 -- The second cidr to associate:' \
@ -187,8 +187,8 @@ _arguments "${_arguments_options[@]}" \
(delete-association) (delete-association)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
'::cidr1 -- The first cidr to associate:' \ '::cidr1 -- The first cidr to associate:' \
'::cidr2 -- The second cidr to associate:' \ '::cidr2 -- The second cidr to associate:' \
@ -196,8 +196,8 @@ _arguments "${_arguments_options[@]}" \
;; ;;
(list-associations) (list-associations)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -208,8 +208,8 @@ _arguments "${_arguments_options[@]}" \
'(-l --listen-port)-u[Unset the local listen port to use a randomized port]' \ '(-l --listen-port)-u[Unset the local listen port to use a randomized port]' \
'(-l --listen-port)--unset[Unset the local listen port to use a randomized port]' \ '(-l --listen-port)--unset[Unset the local listen port to use a randomized port]' \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
@ -220,22 +220,113 @@ _arguments "${_arguments_options[@]}" \
'(-e --endpoint)-u[Unset an existing override to use the automatic endpoint discovery]' \ '(-e --endpoint)-u[Unset an existing override to use the automatic endpoint discovery]' \
'(-e --endpoint)--unset[Unset an existing override to use the automatic endpoint discovery]' \ '(-e --endpoint)--unset[Unset an existing override to use the automatic endpoint discovery]' \
'--yes[Bypass confirmation]' \ '--yes[Bypass confirmation]' \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':interface:' \ ':interface:' \
&& ret=0 && ret=0
;; ;;
(completions) (completions)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'-h[Print help information]' \ '-h[Print help]' \
'--help[Print help information]' \ '--help[Print help]' \
':shell:(bash elvish fish powershell zsh)' \ ':shell:(bash elvish fish powershell zsh)' \
&& ret=0 && ret=0
;; ;;
(help) (help)
_arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \ ":: :_innernet__help_commands" \
"*::: :->help" \
&& ret=0 && ret=0
case $state in
(help)
words=($line[1] "${words[@]}")
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:innernet-help-command-$line[1]:"
case $line[1] in
(install)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(up)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(fetch)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(down)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(add-peer)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(rename-peer)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(add-cidr)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(delete-cidr)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(list-cidrs)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(disable-peer)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(enable-peer)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(add-association)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(delete-association)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(list-associations)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(set-listen-port)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(override-endpoint)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
esac
;;
esac
;; ;;
esac esac
;; ;;
@ -273,100 +364,225 @@ _innernet__add-association_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet add-association commands' commands "$@" _describe -t commands 'innernet add-association commands' commands "$@"
} }
(( $+functions[_innernet__help__add-association_commands] )) ||
_innernet__help__add-association_commands() {
local commands; commands=()
_describe -t commands 'innernet help add-association commands' commands "$@"
}
(( $+functions[_innernet__add-cidr_commands] )) || (( $+functions[_innernet__add-cidr_commands] )) ||
_innernet__add-cidr_commands() { _innernet__add-cidr_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet add-cidr commands' commands "$@" _describe -t commands 'innernet add-cidr commands' commands "$@"
} }
(( $+functions[_innernet__help__add-cidr_commands] )) ||
_innernet__help__add-cidr_commands() {
local commands; commands=()
_describe -t commands 'innernet help add-cidr commands' commands "$@"
}
(( $+functions[_innernet__add-peer_commands] )) || (( $+functions[_innernet__add-peer_commands] )) ||
_innernet__add-peer_commands() { _innernet__add-peer_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet add-peer commands' commands "$@" _describe -t commands 'innernet add-peer commands' commands "$@"
} }
(( $+functions[_innernet__help__add-peer_commands] )) ||
_innernet__help__add-peer_commands() {
local commands; commands=()
_describe -t commands 'innernet help add-peer commands' commands "$@"
}
(( $+functions[_innernet__completions_commands] )) || (( $+functions[_innernet__completions_commands] )) ||
_innernet__completions_commands() { _innernet__completions_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet completions commands' commands "$@" _describe -t commands 'innernet completions commands' commands "$@"
} }
(( $+functions[_innernet__help__completions_commands] )) ||
_innernet__help__completions_commands() {
local commands; commands=()
_describe -t commands 'innernet help completions commands' commands "$@"
}
(( $+functions[_innernet__delete-association_commands] )) || (( $+functions[_innernet__delete-association_commands] )) ||
_innernet__delete-association_commands() { _innernet__delete-association_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet delete-association commands' commands "$@" _describe -t commands 'innernet delete-association commands' commands "$@"
} }
(( $+functions[_innernet__help__delete-association_commands] )) ||
_innernet__help__delete-association_commands() {
local commands; commands=()
_describe -t commands 'innernet help delete-association commands' commands "$@"
}
(( $+functions[_innernet__delete-cidr_commands] )) || (( $+functions[_innernet__delete-cidr_commands] )) ||
_innernet__delete-cidr_commands() { _innernet__delete-cidr_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet delete-cidr commands' commands "$@" _describe -t commands 'innernet delete-cidr commands' commands "$@"
} }
(( $+functions[_innernet__help__delete-cidr_commands] )) ||
_innernet__help__delete-cidr_commands() {
local commands; commands=()
_describe -t commands 'innernet help delete-cidr commands' commands "$@"
}
(( $+functions[_innernet__disable-peer_commands] )) || (( $+functions[_innernet__disable-peer_commands] )) ||
_innernet__disable-peer_commands() { _innernet__disable-peer_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet disable-peer commands' commands "$@" _describe -t commands 'innernet disable-peer commands' commands "$@"
} }
(( $+functions[_innernet__help__disable-peer_commands] )) ||
_innernet__help__disable-peer_commands() {
local commands; commands=()
_describe -t commands 'innernet help disable-peer commands' commands "$@"
}
(( $+functions[_innernet__down_commands] )) || (( $+functions[_innernet__down_commands] )) ||
_innernet__down_commands() { _innernet__down_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet down commands' commands "$@" _describe -t commands 'innernet down commands' commands "$@"
} }
(( $+functions[_innernet__help__down_commands] )) ||
_innernet__help__down_commands() {
local commands; commands=()
_describe -t commands 'innernet help down commands' commands "$@"
}
(( $+functions[_innernet__enable-peer_commands] )) || (( $+functions[_innernet__enable-peer_commands] )) ||
_innernet__enable-peer_commands() { _innernet__enable-peer_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet enable-peer commands' commands "$@" _describe -t commands 'innernet enable-peer commands' commands "$@"
} }
(( $+functions[_innernet__help__enable-peer_commands] )) ||
_innernet__help__enable-peer_commands() {
local commands; commands=()
_describe -t commands 'innernet help enable-peer commands' commands "$@"
}
(( $+functions[_innernet__fetch_commands] )) || (( $+functions[_innernet__fetch_commands] )) ||
_innernet__fetch_commands() { _innernet__fetch_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet fetch commands' commands "$@" _describe -t commands 'innernet fetch commands' commands "$@"
} }
(( $+functions[_innernet__help__fetch_commands] )) ||
_innernet__help__fetch_commands() {
local commands; commands=()
_describe -t commands 'innernet help fetch commands' commands "$@"
}
(( $+functions[_innernet__help_commands] )) || (( $+functions[_innernet__help_commands] )) ||
_innernet__help_commands() { _innernet__help_commands() {
local commands; commands=() local commands; commands=(
'install:Install a new innernet config' \
'show:Enumerate all innernet connections' \
'up:Bring up your local interface, and update it with latest peer list' \
'fetch:Fetch and update your local interface with the latest peer list' \
'uninstall:Uninstall an innernet network' \
'down:Bring down the interface (equivalent to '\''wg-quick down <interface>'\'')' \
'add-peer:Add a new peer' \
'rename-peer:Rename a peer' \
'add-cidr:Add a new CIDR' \
'delete-cidr:Delete a CIDR' \
'list-cidrs:List CIDRs' \
'disable-peer:Disable an enabled peer' \
'enable-peer:Enable a disabled peer' \
'add-association:Add an association between CIDRs' \
'delete-association:Delete an association between CIDRs' \
'list-associations:List existing assocations between CIDRs' \
'set-listen-port:Set the local listen port' \
'override-endpoint:Override your external endpoint that the server sends to other peers' \
'completions:Generate shell completion scripts' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'innernet help commands' commands "$@" _describe -t commands 'innernet help commands' commands "$@"
} }
(( $+functions[_innernet__help__help_commands] )) ||
_innernet__help__help_commands() {
local commands; commands=()
_describe -t commands 'innernet help help commands' commands "$@"
}
(( $+functions[_innernet__help__install_commands] )) ||
_innernet__help__install_commands() {
local commands; commands=()
_describe -t commands 'innernet help install commands' commands "$@"
}
(( $+functions[_innernet__install_commands] )) || (( $+functions[_innernet__install_commands] )) ||
_innernet__install_commands() { _innernet__install_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet install commands' commands "$@" _describe -t commands 'innernet install commands' commands "$@"
} }
(( $+functions[_innernet__help__list-associations_commands] )) ||
_innernet__help__list-associations_commands() {
local commands; commands=()
_describe -t commands 'innernet help list-associations commands' commands "$@"
}
(( $+functions[_innernet__list-associations_commands] )) || (( $+functions[_innernet__list-associations_commands] )) ||
_innernet__list-associations_commands() { _innernet__list-associations_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet list-associations commands' commands "$@" _describe -t commands 'innernet list-associations commands' commands "$@"
} }
(( $+functions[_innernet__help__list-cidrs_commands] )) ||
_innernet__help__list-cidrs_commands() {
local commands; commands=()
_describe -t commands 'innernet help list-cidrs commands' commands "$@"
}
(( $+functions[_innernet__list-cidrs_commands] )) || (( $+functions[_innernet__list-cidrs_commands] )) ||
_innernet__list-cidrs_commands() { _innernet__list-cidrs_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet list-cidrs commands' commands "$@" _describe -t commands 'innernet list-cidrs commands' commands "$@"
} }
(( $+functions[_innernet__help__override-endpoint_commands] )) ||
_innernet__help__override-endpoint_commands() {
local commands; commands=()
_describe -t commands 'innernet help override-endpoint commands' commands "$@"
}
(( $+functions[_innernet__override-endpoint_commands] )) || (( $+functions[_innernet__override-endpoint_commands] )) ||
_innernet__override-endpoint_commands() { _innernet__override-endpoint_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet override-endpoint commands' commands "$@" _describe -t commands 'innernet override-endpoint commands' commands "$@"
} }
(( $+functions[_innernet__help__rename-peer_commands] )) ||
_innernet__help__rename-peer_commands() {
local commands; commands=()
_describe -t commands 'innernet help rename-peer commands' commands "$@"
}
(( $+functions[_innernet__rename-peer_commands] )) || (( $+functions[_innernet__rename-peer_commands] )) ||
_innernet__rename-peer_commands() { _innernet__rename-peer_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet rename-peer commands' commands "$@" _describe -t commands 'innernet rename-peer commands' commands "$@"
} }
(( $+functions[_innernet__help__set-listen-port_commands] )) ||
_innernet__help__set-listen-port_commands() {
local commands; commands=()
_describe -t commands 'innernet help set-listen-port commands' commands "$@"
}
(( $+functions[_innernet__set-listen-port_commands] )) || (( $+functions[_innernet__set-listen-port_commands] )) ||
_innernet__set-listen-port_commands() { _innernet__set-listen-port_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet set-listen-port commands' commands "$@" _describe -t commands 'innernet set-listen-port commands' commands "$@"
} }
(( $+functions[_innernet__help__show_commands] )) ||
_innernet__help__show_commands() {
local commands; commands=()
_describe -t commands 'innernet help show commands' commands "$@"
}
(( $+functions[_innernet__show_commands] )) || (( $+functions[_innernet__show_commands] )) ||
_innernet__show_commands() { _innernet__show_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet show commands' commands "$@" _describe -t commands 'innernet show commands' commands "$@"
} }
(( $+functions[_innernet__help__uninstall_commands] )) ||
_innernet__help__uninstall_commands() {
local commands; commands=()
_describe -t commands 'innernet help uninstall commands' commands "$@"
}
(( $+functions[_innernet__uninstall_commands] )) || (( $+functions[_innernet__uninstall_commands] )) ||
_innernet__uninstall_commands() { _innernet__uninstall_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet uninstall commands' commands "$@" _describe -t commands 'innernet uninstall commands' commands "$@"
} }
(( $+functions[_innernet__help__up_commands] )) ||
_innernet__help__up_commands() {
local commands; commands=()
_describe -t commands 'innernet help up commands' commands "$@"
}
(( $+functions[_innernet__up_commands] )) || (( $+functions[_innernet__up_commands] )) ||
_innernet__up_commands() { _innernet__up_commands() {
local commands; commands=() local commands; commands=()
_describe -t commands 'innernet up commands' commands "$@" _describe -t commands 'innernet up commands' commands "$@"
} }
if [ "$funcstack[1]" = "_innernet" ]; then
_innernet "$@" _innernet "$@"
else
compdef _innernet innernet
fi

View File

@ -1,6 +1,6 @@
[package] [package]
name = "netlink-request" name = "netlink-request"
version = "1.5.5" version = "1.6.0"
edition = "2021" edition = "2021"
[target.'cfg(target_os = "linux")'.dependencies] [target.'cfg(target_os = "linux")'.dependencies]

View File

@ -13,7 +13,7 @@ name = "server"
publish = false publish = false
readme = "README.md" readme = "README.md"
repository = "https://github.com/tonarino/innernet" repository = "https://github.com/tonarino/innernet"
version = "1.5.5" version = "1.6.0"
[[bin]] [[bin]]
name = "innernet-server" name = "innernet-server"

View File

@ -9,7 +9,7 @@ edition = "2021"
license = "MIT" license = "MIT"
name = "shared" name = "shared"
publish = false publish = false
version = "1.5.5" version = "1.6.0"
[dependencies] [dependencies]
anyhow = "1" anyhow = "1"

View File

@ -7,7 +7,7 @@ license = "LGPL-2.1-or-later"
name = "wireguard-control" name = "wireguard-control"
readme = "README.md" readme = "README.md"
repository = "https://github.com/tonarino/innernet" repository = "https://github.com/tonarino/innernet"
version = "1.5.5" version = "1.6.0"
[dependencies] [dependencies]
base64 = "0.13.1" base64 = "0.13.1"