# ronin-repos completion -*- shell-script -*- # This bash completions script was generated by # completely (https://github.com/dannyben/completely) # Modifying it manually is not recommended _ronin-repos_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-repos_completions() { local cur=${COMP_WORDS[COMP_CWORD]} local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" case "$compline" in 'install'*'--cache-dir') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'remove'*'--cache-dir') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'update'*'--cache-dir') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'purge'*'--cache-dir') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'list'*'--cache-dir') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'show'*'--cache-dir') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'new'*'--cache-dir') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'completion'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "--print --install --uninstall")" -- "$cur" ) ;; 'install'*'-C') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'remove'*'-C') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'update'*'-C') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'purge'*'-C') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'install'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "--cache-dir -C")" -- "$cur" ) ;; 'list'*'-C') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'show'*'-C') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'new'*'-C') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'remove'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "--cache-dir -C $(ronin-repos list)")" -- "$cur" ) ;; 'update'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "--cache-dir -C $(ronin-repos list)")" -- "$cur" ) ;; 'purge'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "--cache-dir -C")" -- "$cur" ) ;; 'list'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "--cache-dir -C")" -- "$cur" ) ;; 'show'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "--cache-dir -C $(ronin-repos list)")" -- "$cur" ) ;; 'info'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "$(ronin-repos list)")" -- "$cur" ) ;; 'new'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "--cache-dir -C")" -- "$cur" ) ;; 'rm'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "$(ronin-repos list)")" -- "$cur" ) ;; 'up'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "$(ronin-repos list)")" -- "$cur" ) ;; *) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-repos_completions_filter "--version -V help completion install list new purge remove show update ls up rm info")" -- "$cur" ) ;; esac } && complete -F _ronin-repos_completions ronin-repos # ex: filetype=sh