#!/bin/bash # Put this file to /etc/bash_completion.d/dynb.sh # needed because of Argbash --> m4_ignore([ ### START OF CODE GENERATED BY Argbash v2.10.0 one line above ### # Argbash is a bash code generator used to get arguments parsing right. # Argbash is FREE SOFTWARE, see https://argbash.io for more info _dynb_sh () { local cur prev opts base COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" all_long_opts="--version --link --reset --debug --update-method --ip-mode --domain --service-provider --username --password --token --interval --help " all_short_opts="-v -l -r -m -i -d -s -u -p -t -h " case "$prev" in --update-method|-m|--ip-mode|-i|--domain|-d|--service-provider|-s|--username|-u|--password|-p|--token|-t|--interval) COMPREPLY=( $(compgen -o bashdefault -o default -- "${cur}") ) return 0 ;; *) case "$cur" in --*) COMPREPLY=( $(compgen -W "${all_long_opts}" -- "${cur}") ) return 0 ;; -*) COMPREPLY=( $(compgen -W "${all_short_opts}" -- "${cur}") ) return 0 ;; *) COMPREPLY=( $(compgen -o bashdefault -o default -- "${cur}") ) return 0 ;; esac esac } complete -F _dynb_sh dynb.sh ### END OF CODE GENERATED BY Argbash (sortof) ### ])