Sha256: 39a062e9647e1b1967453b5e984cecd300ecbbbdbc7868f56b323b559c6b70a1

Contents?: true

Size: 450 Bytes

Versions: 4

Compression:

Stored size: 450 Bytes

Contents

<% @cmds.each do |o| %>
  <% if o.suggestion %>
    _<%= o.shortcut %> () {
    local cur options command commands
    _get_comp_words_by_ref cur
    commands=$(<%= o.suggestion %>)
    local cur="${COMP_WORDS[$COMP_CWORD]}"

    if [ -z "($commands)" ]; then
    echo '' >> /dev/null
    else
    COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
    fi
    }

    complete -o default -F _<%= o.shortcut %> <%= o.shortcut %>
  <% end %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ro_commands-0.0.4 lib/builder_templates/completions.erb
ro_commands-0.0.3 lib/builder_templates/completions.erb
ro_commands-0.0.2 lib/builder_templates/completions.erb
ro_commands-0.0.1 lib/builder_templates/completions.erb