_signd() { 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 "$1") cmd="signd" ;; *) ;; esac done case "${cmd}" in signd) opts="-h -V -v -d -c -T -M -X -R -n -t --help --version --verbose --data-dir --config --tor-proxy --msg --ctl --rpc --chain --electrum-server --electrum-port --threaded" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --data-dir) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -d) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --tor-proxy) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -T) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --msg) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -M) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --ctl) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -X) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --rpc) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -R) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -n) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --electrum-server) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --electrum-port) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; esac } complete -F _signd -o bashdefault -o default signd