github.com/tirogen/go-ethereum@v1.10.12-0.20221226051715-250cfede41b6/build/deb/ethereum/completions/bash/geth (about) 1 _geth_bash_autocomplete() { 2 if [[ "${COMP_WORDS[0]}" != "source" ]]; then 3 local cur opts base 4 COMPREPLY=() 5 cur="${COMP_WORDS[COMP_CWORD]}" 6 if [[ "$cur" == "-"* ]]; then 7 opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} ${cur} --generate-bash-completion ) 8 else 9 opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) 10 fi 11 COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) 12 return 0 13 fi 14 } 15 16 complete -o bashdefault -o default -o nospace -F _geth_bash_autocomplete geth