Sha256: 89d07e54966a46a070744aefa9d1d04330b693fe5f2bcb6e45d30d1699b261cc

Contents?: true

Size: 483 Bytes

Versions: 9

Compression:

Stored size: 483 Bytes

Contents

_<%= project_name %>() {
  COMPREPLY=()
  local word="${COMP_WORDS[COMP_CWORD]}"

  if [ "$COMP_CWORD" -eq 1 ]; then
    local completions=$(<%= project_name %> completions)
    COMPREPLY=( $(compgen -W "$completions" -- "$word") )
  else
    local words=("${COMP_WORDS[@]}")
    unset words[0]
    local completions=$(<%= project_name %> completions ${words[@]})
    COMPREPLY=( $(compgen -W "$completions" -- "$word") )
  fi
}

complete -F _<%= project_name %> <%= project_name %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cli-template-4.0.2 lib/templates/colon_namespaces/lib/%underscored_name%/completer/script.sh.tt
cli-template-4.0.1 lib/templates/colon_namespaces/lib/%underscored_name%/completer/script.sh.tt
cli-template-4.0.0 lib/templates/colon_namespaces/lib/%underscored_name%/completer/script.sh.tt
cli-template-3.5.1 lib/templates/colon_namespaces/lib/%underscored_name%/completer/script.sh.tt
cli-template-3.5.0 lib/templates/colon_namespaces/lib/%underscored_name%/completer/script.sh.tt
cli-template-3.4.0 lib/templates/colon_namespaces/lib/%underscored_name%/completer/script.sh.tt
cli-template-3.3.0 lib/templates/colon_namespaces/lib/%underscored_name%/completer/script.sh.tt
cli-template-3.2.0 lib/templates/colon_namespaces/lib/%underscored_name%/completer/script.sh.tt
cli-template-3.1.0 lib/templates/default/lib/%underscored_name%/completer/script.sh.tt