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

Version Path
le1t0-deprec-2.1.6.040 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.039 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.038 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.037 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.036 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.035 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.034 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.033 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.032 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.031 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.030 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.029 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.028 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.027 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.026 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.025 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.024 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.023 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.022 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.021 lib/deprec_cmd_completion.sh