# ronin-listener completion -*- shell-script -*- # This bash completions script was generated by # completely (https://github.com/dannyben/completely) # Modifying it manually is not recommended _ronin-listener_completions_filter() { local words="$1" local cur=${COMP_WORDS[COMP_CWORD]} local result=() if [[ "${cur:0:1}" == "-" ]]; then echo "$words" else for word in $words; do [[ "${word:0:1}" != "-" ]] && result+=("$word") done echo "${result[*]}" fi } _ronin-listener_completions() { local cur=${COMP_WORDS[COMP_CWORD]} local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" case "$compline" in 'new http'*'--vhost') while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A hostname -- "$cur") ;; 'new http'*'--root') while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur") ;; 'http'*'--output') while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur") ;; 'dns'*'--output') while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur") ;; 'http'*'--vhost') while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A hostname -- "$cur") ;; 'new http'*'-R') while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur") ;; 'http'*'--root') while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur") ;; 'completion'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--print --install --uninstall")" -- "$cur") ;; 'new http'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--host -H --port -p --vhost --root -R")" -- "$cur") ;; 'http'*'-o') while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur") ;; 'http'*'-R') while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur") ;; 'new dns'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--host -H --port -p --domain -d")" -- "$cur") ;; 'dns'*'-o') while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur") ;; 'http'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--output -o --output-format -F --host -H --port -p --vhost --root -R")" -- "$cur") ;; 'new'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "help dns http")" -- "$cur") ;; 'dns'*) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--output -o --output-format -F --host -H --port -p")" -- "$cur") ;; *) while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--version -V help completion dns http new")" -- "$cur") ;; esac } && complete -F _ronin-listener_completions ronin-listener # ex: filetype=sh