_orthanc() { 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 orthanc) cmd="orthanc" ;; anonymize) cmd+="__anonymize" ;; create) cmd+="__create" ;; delete) cmd+="__delete" ;; download) cmd+="__download" ;; echo) cmd+="__echo" ;; help) cmd+="__help" ;; instance) cmd+="__instance" ;; list) cmd+="__list" ;; list-instances) cmd+="__list__instances" ;; list-series) cmd+="__list__series" ;; list-studies) cmd+="__list__studies" ;; modality) cmd+="__modality" ;; modify) cmd+="__modify" ;; patient) cmd+="__patient" ;; search) cmd+="__search" ;; series) cmd+="__series" ;; show) cmd+="__show" ;; store) cmd+="__store" ;; study) cmd+="__study" ;; tags) cmd+="__tags" ;; *) ;; esac done case "${cmd}" in orthanc) opts=" -s -u -p -h -V --server --username --password --help --version patient study series instance modality help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --server) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -s) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --username) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -u) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --password) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -p) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__help) opts=" -h -V --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__instance) opts=" -h -V --help --version list show tags search anonymize modify download delete" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__instance__anonymize) opts=" -r -k -p -c -o -h -V --replace --keep --keep-private-tags --config --output --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --replace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -r) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --keep) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -k) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --output) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -o) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__instance__delete) opts=" -h -V --help --version " 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 ;; orthanc__instance__download) opts=" -o -h -V --output --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --output) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -o) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__instance__list) opts=" -n -c -h -V --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__instance__modify) opts=" -r -m -c -o -h -V --replace --remove --config --output --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --replace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -r) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --remove) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -m) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --output) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -o) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__instance__search) opts=" -q -n -c -h -V --query --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --query) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -q) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__instance__show) opts=" -h -V --help --version " 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 ;; orthanc__instance__tags) opts=" -h -V --help --version " 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 ;; orthanc__modality) opts=" -h -V --help --version list show create modify echo store delete" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__modality__create) opts=" -a -h -p -V --aet --host --port --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --aet) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -a) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --host) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -h) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --port) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -p) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__modality__delete) opts=" -h -V --help --version " 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 ;; orthanc__modality__echo) opts=" -h -V --help --version " 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 ;; orthanc__modality__list) opts=" -n -c -h -V --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__modality__modify) opts=" -a -h -p -V --aet --host --port --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --aet) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -a) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --host) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -h) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --port) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -p) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__modality__show) opts=" -h -V --help --version " 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 ;; orthanc__modality__store) opts=" -e -h -V --entity-ids --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --entity-ids) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -e) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__patient) opts=" -h -V --help --version list show list-studies search anonymize modify download delete" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__patient__anonymize) opts=" -r -k -p -c -h -V --replace --keep --keep-private-tags --config --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --replace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -r) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --keep) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -k) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__patient__delete) opts=" -h -V --help --version " 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 ;; orthanc__patient__download) opts=" -o -h -V --output --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --output) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -o) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__patient__list) opts=" -n -c -h -V --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__patient__list__studies) opts=" -n -c -h -V --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__patient__modify) opts=" -r -m -c -h -V --replace --remove --config --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --replace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -r) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --remove) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -m) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__patient__search) opts=" -q -n -c -h -V --query --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --query) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -q) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__patient__show) opts=" -h -V --help --version " 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 ;; orthanc__series) opts=" -h -V --help --version list show list-instances search anonymize modify download delete" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__series__anonymize) opts=" -r -k -p -c -h -V --replace --keep --keep-private-tags --config --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --replace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -r) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --keep) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -k) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__series__delete) opts=" -h -V --help --version " 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 ;; orthanc__series__download) opts=" -o -h -V --output --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --output) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -o) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__series__list) opts=" -n -c -h -V --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__series__list__instances) opts=" -n -c -h -V --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__series__modify) opts=" -r -m -c -h -V --replace --remove --config --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --replace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -r) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --remove) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -m) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__series__search) opts=" -q -n -c -h -V --query --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --query) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -q) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__series__show) opts=" -h -V --help --version " 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 ;; orthanc__study) opts=" -h -V --help --version list show list-series search anonymize modify download delete" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__study__anonymize) opts=" -r -k -p -c -h -V --replace --keep --keep-private-tags --config --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --replace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -r) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --keep) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -k) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__study__delete) opts=" -h -V --help --version " 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 ;; orthanc__study__download) opts=" -o -h -V --output --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --output) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -o) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__study__list) opts=" -n -c -h -V --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__study__list__series) opts=" -n -c -h -V --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__study__modify) opts=" -r -m -c -h -V --replace --remove --config --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --replace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -r) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --remove) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -m) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__study__search) opts=" -q -n -c -h -V --query --no-header --columns --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --query) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -q) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --columns) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; orthanc__study__show) opts=" -h -V --help --version " 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 ;; esac } complete -F _orthanc -o bashdefault -o default orthanc