File: bash.j2

package info (click to toggle)
click-completion 0.5.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 140 kB
  • sloc: python: 442; makefile: 4
file content (12 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
_{{prog_name}}_completion() {
    local IFS=$'\t'
    COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \
                   COMP_CWORD=$COMP_CWORD \
{%- for k, v in extra_env.items() %}
                   {{k}}={{v}} \
{%- endfor %}
                   {{complete_var}}=complete-bash $1 ) )
    return 0
}

complete -F _{{prog_name}}_completion -o default {{prog_name}}