From 05c2bb904fdde6377108a1c1e669394d44ca6014 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 10 Feb 2021 23:02:05 -0800 Subject: commit shell completions --- extra/fatcat-cli.bash_completions | 958 ++++++++++++++++++++++++++++++++++++++ extra/fatcat-cli.zsh_completions | 958 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 1916 insertions(+) create mode 100644 extra/fatcat-cli.bash_completions create mode 100644 extra/fatcat-cli.zsh_completions diff --git a/extra/fatcat-cli.bash_completions b/extra/fatcat-cli.bash_completions new file mode 100644 index 0000000..780768d --- /dev/null +++ b/extra/fatcat-cli.bash_completions @@ -0,0 +1,958 @@ +_fatcat-cli() { + 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 + fatcat-cli) + cmd="fatcat-cli" + ;; + + accept) + cmd+="__accept" + ;; + batch) + cmd+="__batch" + ;; + changelog) + cmd+="__changelog" + ;; + create) + cmd+="__create" + ;; + delete) + cmd+="__delete" + ;; + download) + cmd+="__download" + ;; + edit) + cmd+="__edit" + ;; + editgroups) + cmd+="__editgroups" + ;; + get) + cmd+="__get" + ;; + help) + cmd+="__help" + ;; + history) + cmd+="__history" + ;; + list) + cmd+="__list" + ;; + reviewable) + cmd+="__reviewable" + ;; + search) + cmd+="__search" + ;; + status) + cmd+="__status" + ;; + submit) + cmd+="__submit" + ;; + unsubmit) + cmd+="__unsubmit" + ;; + update) + cmd+="__update" + ;; + *) + ;; + esac + done + + case "${cmd}" in + fatcat-cli) + opts=" -v -h -V --verbose --meow --help --version --api-host --api-token --search-host --shell-completions get create update delete edit download history search editgroups changelog batch status help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --shell-completions) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + + fatcat__cli__batch) + opts=" -h -V -v -i --help --version --verbose --input-file --limit --api-host --api-token --search-host create update delete download help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --input-file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -i) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__batch__create) + opts=" -h -V -v --auto-accept --help --version --verbose --batch-size --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --batch-size) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__batch__delete) + opts=" -h -V -v --auto-accept --help --version --verbose --batch-size --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --batch-size) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__batch__download) + opts=" -h -V -v -o -j --help --version --verbose --output-dir --jobs --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --output-dir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --jobs) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -j) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__batch__help) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__batch__update) + opts=" -h -V -v --auto-accept --help --version --verbose --batch-size --api-host --api-token --search-host ... " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --batch-size) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__changelog) + opts=" -h -V -v -n --json --help --version --verbose --limit --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -n) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__create) + opts=" -h -V -v -i -e --help --version --verbose --input-file --editgroup-id --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --input-file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -i) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --editgroup-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__delete) + opts=" -h -V -v -e --help --version --verbose --editgroup-id --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --editgroup-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__download) + opts=" -h -V -v -o --help --version --verbose --output-dir --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --output-dir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__edit) + opts=" -h -V -v -e --json --toml --help --version --verbose --editgroup-id --editing-command --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --editgroup-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --editing-command) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host create list reviewable accept submit unsubmit help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__accept) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__create) + opts=" -h -V -v -d --help --version --verbose --description --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --description) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -d) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__help) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__list) + opts=" -h -V -v -e -n --json --help --version --verbose --editor-id --limit --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --editor-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -n) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__reviewable) + opts=" -h -V -v -n --json --help --version --verbose --limit --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -n) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__submit) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__unsubmit) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__get) + opts=" -h -V -v --json --toml --help --version --verbose --expand --hide --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --expand) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --hide) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__help) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__history) + opts=" -h -V -v -n --json --help --version --verbose --limit --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -n) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__search) + opts=" -h -V -v -n --count --entity-json --index-json --help --version --verbose --expand --hide --limit --api-host --api-token --search-host ... " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --expand) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --hide) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -n) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__status) + opts=" -h -V -v --json --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__update) + opts=" -h -V -v -i -e --help --version --verbose --input-file --editgroup-id --api-host --api-token --search-host ... " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --input-file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -i) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --editgroup-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + esac +} + +complete -F _fatcat-cli -o bashdefault -o default fatcat-cli diff --git a/extra/fatcat-cli.zsh_completions b/extra/fatcat-cli.zsh_completions new file mode 100644 index 0000000..780768d --- /dev/null +++ b/extra/fatcat-cli.zsh_completions @@ -0,0 +1,958 @@ +_fatcat-cli() { + 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 + fatcat-cli) + cmd="fatcat-cli" + ;; + + accept) + cmd+="__accept" + ;; + batch) + cmd+="__batch" + ;; + changelog) + cmd+="__changelog" + ;; + create) + cmd+="__create" + ;; + delete) + cmd+="__delete" + ;; + download) + cmd+="__download" + ;; + edit) + cmd+="__edit" + ;; + editgroups) + cmd+="__editgroups" + ;; + get) + cmd+="__get" + ;; + help) + cmd+="__help" + ;; + history) + cmd+="__history" + ;; + list) + cmd+="__list" + ;; + reviewable) + cmd+="__reviewable" + ;; + search) + cmd+="__search" + ;; + status) + cmd+="__status" + ;; + submit) + cmd+="__submit" + ;; + unsubmit) + cmd+="__unsubmit" + ;; + update) + cmd+="__update" + ;; + *) + ;; + esac + done + + case "${cmd}" in + fatcat-cli) + opts=" -v -h -V --verbose --meow --help --version --api-host --api-token --search-host --shell-completions get create update delete edit download history search editgroups changelog batch status help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --shell-completions) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + + fatcat__cli__batch) + opts=" -h -V -v -i --help --version --verbose --input-file --limit --api-host --api-token --search-host create update delete download help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --input-file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -i) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__batch__create) + opts=" -h -V -v --auto-accept --help --version --verbose --batch-size --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --batch-size) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__batch__delete) + opts=" -h -V -v --auto-accept --help --version --verbose --batch-size --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --batch-size) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__batch__download) + opts=" -h -V -v -o -j --help --version --verbose --output-dir --jobs --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --output-dir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --jobs) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -j) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__batch__help) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__batch__update) + opts=" -h -V -v --auto-accept --help --version --verbose --batch-size --api-host --api-token --search-host ... " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --batch-size) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__changelog) + opts=" -h -V -v -n --json --help --version --verbose --limit --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -n) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__create) + opts=" -h -V -v -i -e --help --version --verbose --input-file --editgroup-id --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --input-file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -i) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --editgroup-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__delete) + opts=" -h -V -v -e --help --version --verbose --editgroup-id --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --editgroup-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__download) + opts=" -h -V -v -o --help --version --verbose --output-dir --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --output-dir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__edit) + opts=" -h -V -v -e --json --toml --help --version --verbose --editgroup-id --editing-command --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --editgroup-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --editing-command) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host create list reviewable accept submit unsubmit help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__accept) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__create) + opts=" -h -V -v -d --help --version --verbose --description --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --description) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -d) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__help) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__list) + opts=" -h -V -v -e -n --json --help --version --verbose --editor-id --limit --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --editor-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -n) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__reviewable) + opts=" -h -V -v -n --json --help --version --verbose --limit --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -n) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__submit) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__editgroups__unsubmit) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__get) + opts=" -h -V -v --json --toml --help --version --verbose --expand --hide --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --expand) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --hide) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__help) + opts=" -h -V -v --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__history) + opts=" -h -V -v -n --json --help --version --verbose --limit --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -n) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__search) + opts=" -h -V -v -n --count --entity-json --index-json --help --version --verbose --expand --hide --limit --api-host --api-token --search-host ... " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --expand) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --hide) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -n) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__status) + opts=" -h -V -v --json --help --version --verbose --api-host --api-token --search-host " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + fatcat__cli__update) + opts=" -h -V -v -i -e --help --version --verbose --input-file --editgroup-id --api-host --api-token --search-host ... " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --input-file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -i) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --editgroup-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --api-token) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search-host) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + esac +} + +complete -F _fatcat-cli -o bashdefault -o default fatcat-cli -- cgit v1.2.3