Sha256: 7fc0ff086cb06a95a8beb5778a483c1c57b7d74af3311a5bee2ae94796c708f3
Contents?: true
Size: 655 Bytes
Versions: 146
Compression:
Stored size: 655 Bytes
Contents
export CAP_TASKS=$( cap -T | grep '^cap' | cut -d' ' -f 2 ) _cap() { local cur tasks colonprefixes COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" tasks=$CAP_TASKS # uncomment this for dynamic task lists # tasks=$( cap -T | cut -d' ' -f 2 | grep deprec) # Work-around bash_completion issue where bash interprets a colon # as a separator. # Work-around borrowed from the darcs work-around for the same # issue. colonprefixes=${cur%"${cur##*:}"} COMPREPLY=( $(compgen -W "${tasks}" -- ${cur}) ) local i=${#COMPREPLY[*]} while [ $((--i)) -ge 0 ]; do COMPREPLY[$i]=${COMPREPLY[$i]#"$colonprefixes"} done return 0 } complete -F _cap cap
Version data entries
146 entries across 146 versions & 6 rubygems