From 33368b57aa077ac13448f4d4927dd8a77934f763 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 11 Nov 2022 13:33:16 -0800 Subject: pds: manpage, shell completions --- extra/adenosine-pds.1 | 115 +++++++++++++++ extra/adenosine-pds.1.md | 105 +++++++++++++ extra/adenosine-pds.1.scdoc | 78 ++++++++++ extra/adenosine-pds.bash_completions | 277 +++++++++++++++++++++++++++++++++++ extra/adenosine-pds.zsh_completions | 277 +++++++++++++++++++++++++++++++++++ extra/adenosine.bash_completions | 48 +++++- extra/adenosine.zsh_completions | 48 +++++- 7 files changed, 934 insertions(+), 14 deletions(-) create mode 100644 extra/adenosine-pds.1 create mode 100644 extra/adenosine-pds.1.md create mode 100644 extra/adenosine-pds.1.scdoc create mode 100644 extra/adenosine-pds.bash_completions create mode 100644 extra/adenosine-pds.zsh_completions (limited to 'extra') diff --git a/extra/adenosine-pds.1 b/extra/adenosine-pds.1 new file mode 100644 index 0000000..183f390 --- /dev/null +++ b/extra/adenosine-pds.1 @@ -0,0 +1,115 @@ +.\" Generated by scdoc 1.11.1 +.\" Complete documentation for this program is not available as a GNU info page +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.nh +.ad l +.\" Begin generated content: +.TH "adenosine-pds" "1" "2022-11-11" "adenosine PDS Server Manual Page" +.P +.SH NAME +.P +adenosine-pds: small-world atproto.\&com Personal Data Server +.P +.SH SYNOPSIS +.P +adenosine-pds [OPTIONS] +.P +.SH DESCRIPTION +.P +This is a simple, enthusiast-grade AT Protocol (atproto.\&com) personal data +server ("PDS") implementation.\& It targets "small-world" uses cases of the +protocol, for example personal or organizational self-hosting.\& +.P +This is a work-in-progress, is not spec-compliant, will not be +backwards/forwards compatible, and does not have an upgrade/migration path.\& +.P +.SH COMMANDS +.P +\fBgenerate-secret\fR +.RS 4 +Creates a new random secret key for PDS use +.P +.RE +\fBserve\fR [OPTIONS] +.RS 4 +Runs the server.\& See options below +.P +.RE +\fBimport\fR [--alias ] +.RS 4 +Loads a CAR file into the repository blockstore +.P +.RE +\fBinspect\fR +.RS 4 +Prints information about repositories in the blockstore (likely to deprecate) +.P +.P +.RE +.SH OPTIONS +.P +\fB-h, --help\fR +.RS 4 +Prints help information +.P +.RE +\fB-V, --version\fR +.RS 4 +Prints version information +.P +.RE +\fB-v, --verbose\fR +.RS 4 +Pass many times for more log output +By default, it'll only report errors.\& Passing `-v` one time also prints warnings, `-vv` enables info logging, `-vvv` debug, and `-vvvv` trace.\& +.P +.RE +\fB--atp-db \fR [env: ATP_ATP_DB] +.RS 4 +File path of sqlite database holding system/application data +.P +.RE +\fB--block-db \fR [env: ATP_BLOCK_DB] +.RS 4 +File path of sqlite database holding repository data (blockstore) +.P +.RE +.SS SERVE OPTIONS +.P +\fB--homepage-handle \fR [env: ATP_PDS_HOMEPAGE_HANDLE] +.RS 4 +Optionally, override domain name check and force the homepage to display the account page for this handle +.P +.RE +\fB--invite-code \fR [env: ATP_PDS_INVITE_CODE] +.RS 4 +Optionally, require an invite code to sign up.\& This is just a single secret value +.P +.RE +\fB--pds-secret-key \fR [env: ATP_PDS_SECRET_KEY] +.RS 4 +Secret key, encoded in hex.\& Use 'generate-secret' to create a new one +.P +.RE +\fB--port \fR [env: ATP_PDS_PORT] [default: 3030] +.RS 4 +Localhost port to listen on +.P +.RE +\fB--public-url \fR [env: ATP_PDS_PUBLIC_URL] +.RS 4 +A "public URL" for the PDS gets embedded in DID documents.\& If one is not +provided, a localhost value will be used, which will not actually work for +inter-PDS communication +.P +.RE +\fB--registration-domain \fR [env: ATP_PDS_REGISTRATION_DOMAIN] +.RS 4 +If provided, allow registration for the given base domain name +.P +.P +.RE +.SH GETTING STARTED +.P +TODO diff --git a/extra/adenosine-pds.1.md b/extra/adenosine-pds.1.md new file mode 100644 index 0000000..98341c1 --- /dev/null +++ b/extra/adenosine-pds.1.md @@ -0,0 +1,105 @@ +NAME +==== + +adenosine-pds: small-world atproto.com Personal Data Server + +SYNOPSIS +======== + +adenosine-pds \[OPTIONS\] \ \ + +DESCRIPTION +=========== + +This is a simple, enthusiast-grade AT Protocol (atproto.com) personal +data server (\"PDS\") implementation. It targets \"small-world\" uses +cases of the protocol, for example personal or organizational +self-hosting. + +This is a work-in-progress, is not spec-compliant, will not be +backwards/forwards compatible, and does not have an upgrade/migration +path. + +COMMANDS +======== + +**generate-secret** + +> Creates a new random secret key for PDS use + +**serve** \[OPTIONS\] + +> Runs the server. See options below + +**import** \ \[\--alias \\] + +> Loads a CAR file into the repository blockstore + +**inspect** + +> Prints information about repositories in the blockstore (likely to +> deprecate) + +OPTIONS +======= + +**-h, \--help** + +> Prints help information + +**-V, \--version** + +> Prints version information + +**-v, \--verbose** + +> Pass many times for more log output By default, it\'ll only report +> errors. Passing \`-v\` one time also prints warnings, \`-vv\` enables +> info logging, \`-vvv\` debug, and \`-vvvv\` trace. + +**\--atp-db \** \[env: ATP\_ATP\_DB\] + +> File path of sqlite database holding system/application data + +**\--block-db \** \[env: ATP\_BLOCK\_DB\] + +> File path of sqlite database holding repository data (blockstore) + +SERVE OPTIONS +------------- + +**\--homepage-handle \** \[env: +ATP\_PDS\_HOMEPAGE\_HANDLE\] + +> Optionally, override domain name check and force the homepage to +> display the account page for this handle + +**\--invite-code \** \[env: ATP\_PDS\_INVITE\_CODE\] + +> Optionally, require an invite code to sign up. This is just a single +> secret value + +**\--pds-secret-key \** \[env: ATP\_PDS\_SECRET\_KEY\] + +> Secret key, encoded in hex. Use \'generate-secret\' to create a new +> one + +**\--port \** \[env: ATP\_PDS\_PORT\] \[default: 3030\] + +> Localhost port to listen on + +**\--public-url \** \[env: ATP\_PDS\_PUBLIC\_URL\] + +> A \"public URL\" for the PDS gets embedded in DID documents. If one is +> not provided, a localhost value will be used, which will not actually +> work for inter-PDS communication + +**\--registration-domain \** \[env: +ATP\_PDS\_REGISTRATION\_DOMAIN\] + +> If provided, allow registration for the given base domain name + +GETTING STARTED +=============== + +TODO diff --git a/extra/adenosine-pds.1.scdoc b/extra/adenosine-pds.1.scdoc new file mode 100644 index 0000000..750a176 --- /dev/null +++ b/extra/adenosine-pds.1.scdoc @@ -0,0 +1,78 @@ +adenosine-pds(1) "adenosine PDS Server Manual Page" + +# NAME + +adenosine-pds: small-world atproto.com Personal Data Server + +# SYNOPSIS + +adenosine-pds [OPTIONS] + +# DESCRIPTION + +This is a simple, enthusiast-grade AT Protocol (atproto.com) personal data +server ("PDS") implementation. It targets "small-world" uses cases of the +protocol, for example personal or organizational self-hosting. + +This is a work-in-progress, is not spec-compliant, will not be +backwards/forwards compatible, and does not have an upgrade/migration path. + +# COMMANDS + +*generate-secret* + Creates a new random secret key for PDS use + +*serve* [OPTIONS] + Runs the server. See options below + +*import* [--alias ] + Loads a CAR file into the repository blockstore + +*inspect* + Prints information about repositories in the blockstore (likely to deprecate) + + +# OPTIONS + +*-h, --help* + Prints help information + +*-V, --version* + Prints version information + +*-v, --verbose* + Pass many times for more log output + By default, it'll only report errors. Passing `-v` one time also prints warnings, `-vv` enables info logging, `-vvv` debug, and `-vvvv` trace. + +*--atp-db * [env: ATP_ATP_DB] + File path of sqlite database holding system/application data + +*--block-db * [env: ATP_BLOCK_DB] + File path of sqlite database holding repository data (blockstore) + +## SERVE OPTIONS + +*--homepage-handle * [env: ATP_PDS_HOMEPAGE_HANDLE] + Optionally, override domain name check and force the homepage to display the account page for this handle + +*--invite-code * [env: ATP_PDS_INVITE_CODE] + Optionally, require an invite code to sign up. This is just a single secret value + +*--pds-secret-key * [env: ATP_PDS_SECRET_KEY] + Secret key, encoded in hex. Use 'generate-secret' to create a new one + +*--port * [env: ATP_PDS_PORT] [default: 3030] + Localhost port to listen on + +*--public-url * [env: ATP_PDS_PUBLIC_URL] + A "public URL" for the PDS gets embedded in DID documents. If one is not + provided, a localhost value will be used, which will not actually work for + inter-PDS communication + +*--registration-domain * [env: ATP_PDS_REGISTRATION_DOMAIN] + If provided, allow registration for the given base domain name + + +# GETTING STARTED + +TODO diff --git a/extra/adenosine-pds.bash_completions b/extra/adenosine-pds.bash_completions new file mode 100644 index 0000000..608179d --- /dev/null +++ b/extra/adenosine-pds.bash_completions @@ -0,0 +1,277 @@ +_adenosine() { + local i cur prev opts cmds + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + cmd="" + opts="" + + for i in ${COMP_WORDS[@]} + do + case "${i}" in + adenosine) + cmd="adenosine" + ;; + + generate-secret) + cmd+="__generate__secret" + ;; + help) + cmd+="__help" + ;; + import) + cmd+="__import" + ;; + inspect) + cmd+="__inspect" + ;; + register) + cmd+="__register" + ;; + serve) + cmd+="__serve" + ;; + *) + ;; + esac + done + + case "${cmd}" in + adenosine) + opts=" -v -h -V --verbose --help --version --block-db --atp-db --shell-completions serve import inspect generate-secret register help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --shell-completions) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + + adenosine__generate__secret) + opts=" -h -V -v --help --version --verbose --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + adenosine__help) + opts=" -h -V -v --help --version --verbose --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + adenosine__import) + opts=" -h -V -v --help --version --verbose --alias --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --alias) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + adenosine__inspect) + opts=" -h -V -v --help --version --verbose --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + adenosine__register) + opts=" -d -V -v -h -p -e -r --did-plc --help --version --verbose --pds-secret-key --public-url --handle --password --email --recovery-key --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --pds-secret-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --public-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --handle) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -h) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --password) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -p) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --email) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --recovery-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -r) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + adenosine__serve) + opts=" -h -V -v --help --version --verbose --pds-secret-key --port --public-url --registration-domain --invite-code --homepage-handle --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --pds-secret-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --port) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --public-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --registration-domain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --invite-code) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --homepage-handle) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + esac +} + +complete -F _adenosine -o bashdefault -o default adenosine diff --git a/extra/adenosine-pds.zsh_completions b/extra/adenosine-pds.zsh_completions new file mode 100644 index 0000000..608179d --- /dev/null +++ b/extra/adenosine-pds.zsh_completions @@ -0,0 +1,277 @@ +_adenosine() { + local i cur prev opts cmds + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + cmd="" + opts="" + + for i in ${COMP_WORDS[@]} + do + case "${i}" in + adenosine) + cmd="adenosine" + ;; + + generate-secret) + cmd+="__generate__secret" + ;; + help) + cmd+="__help" + ;; + import) + cmd+="__import" + ;; + inspect) + cmd+="__inspect" + ;; + register) + cmd+="__register" + ;; + serve) + cmd+="__serve" + ;; + *) + ;; + esac + done + + case "${cmd}" in + adenosine) + opts=" -v -h -V --verbose --help --version --block-db --atp-db --shell-completions serve import inspect generate-secret register help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --shell-completions) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + + adenosine__generate__secret) + opts=" -h -V -v --help --version --verbose --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + adenosine__help) + opts=" -h -V -v --help --version --verbose --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + adenosine__import) + opts=" -h -V -v --help --version --verbose --alias --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --alias) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + adenosine__inspect) + opts=" -h -V -v --help --version --verbose --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + adenosine__register) + opts=" -d -V -v -h -p -e -r --did-plc --help --version --verbose --pds-secret-key --public-url --handle --password --email --recovery-key --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --pds-secret-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --public-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --handle) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -h) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --password) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -p) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --email) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --recovery-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -r) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + adenosine__serve) + opts=" -h -V -v --help --version --verbose --pds-secret-key --port --public-url --registration-domain --invite-code --homepage-handle --block-db --atp-db " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --pds-secret-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --port) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --public-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --registration-domain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --invite-code) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --homepage-handle) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --block-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --atp-db) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + esac +} + +complete -F _adenosine -o bashdefault -o default adenosine diff --git a/extra/adenosine.bash_completions b/extra/adenosine.bash_completions index 068a82f..2db0670 100644 --- a/extra/adenosine.bash_completions +++ b/extra/adenosine.bash_completions @@ -91,6 +91,9 @@ _adenosine() { status) cmd+="__status" ;; + timeline) + cmd+="__timeline" + ;; update) cmd+="__update" ;; @@ -224,18 +227,18 @@ _adenosine() { return 0 ;; adenosine__account__login) - opts=" -V -v -h -p --help --version --verbose --handle --password --host --auth-token " + opts=" -h -V -v -u -p --help --version --verbose --username --password --host --auth-token " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --handle) + --username) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - -h) + -u) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; @@ -286,7 +289,7 @@ _adenosine() { return 0 ;; adenosine__account__register) - opts=" -V -v -e -h -p -r --help --version --verbose --email --handle --password --recovery-key --host --auth-token " + opts=" -h -V -v -e -u -p -r -i --help --version --verbose --email --username --password --recovery-key --invite-code --host --auth-token " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -301,11 +304,11 @@ _adenosine() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --handle) + --username) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - -h) + -u) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; @@ -325,6 +328,14 @@ _adenosine() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --invite-code) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -i) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --host) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -341,7 +352,7 @@ _adenosine() { return 0 ;; adenosine__bsky) - opts=" -h -V -v --help --version --verbose --host --auth-token feed notifications post repost like follow profile search-users help" + opts=" -h -V -v --help --version --verbose --host --auth-token feed timeline notifications post repost like follow profile search-users help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -570,6 +581,29 @@ _adenosine() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; + adenosine__bsky__timeline) + opts=" -h -V -v --help --version --verbose --host --auth-token " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --auth-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; adenosine__create) opts=" -h -V -v --help --version --verbose --host --auth-token ... " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then diff --git a/extra/adenosine.zsh_completions b/extra/adenosine.zsh_completions index 068a82f..2db0670 100644 --- a/extra/adenosine.zsh_completions +++ b/extra/adenosine.zsh_completions @@ -91,6 +91,9 @@ _adenosine() { status) cmd+="__status" ;; + timeline) + cmd+="__timeline" + ;; update) cmd+="__update" ;; @@ -224,18 +227,18 @@ _adenosine() { return 0 ;; adenosine__account__login) - opts=" -V -v -h -p --help --version --verbose --handle --password --host --auth-token " + opts=" -h -V -v -u -p --help --version --verbose --username --password --host --auth-token " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --handle) + --username) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - -h) + -u) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; @@ -286,7 +289,7 @@ _adenosine() { return 0 ;; adenosine__account__register) - opts=" -V -v -e -h -p -r --help --version --verbose --email --handle --password --recovery-key --host --auth-token " + opts=" -h -V -v -e -u -p -r -i --help --version --verbose --email --username --password --recovery-key --invite-code --host --auth-token " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -301,11 +304,11 @@ _adenosine() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --handle) + --username) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - -h) + -u) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; @@ -325,6 +328,14 @@ _adenosine() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --invite-code) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -i) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --host) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -341,7 +352,7 @@ _adenosine() { return 0 ;; adenosine__bsky) - opts=" -h -V -v --help --version --verbose --host --auth-token feed notifications post repost like follow profile search-users help" + opts=" -h -V -v --help --version --verbose --host --auth-token feed timeline notifications post repost like follow profile search-users help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -570,6 +581,29 @@ _adenosine() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; + adenosine__bsky__timeline) + opts=" -h -V -v --help --version --verbose --host --auth-token " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --auth-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; adenosine__create) opts=" -h -V -v --help --version --verbose --host --auth-token ... " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then -- cgit v1.2.3