diff options
Diffstat (limited to 'extra/adenosine-pds.bash_completions')
-rw-r--r-- | extra/adenosine-pds.bash_completions | 277 |
1 files changed, 277 insertions, 0 deletions
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 <car-path> " + 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 |