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
andyh-deprec-1.99.26 lib/deprec_cmd_completion.sh
andyh-deprec-1.99.27 lib/deprec_cmd_completion.sh
isaac-deprec-1.99.30 lib/deprec_cmd_completion.sh
isaac-deprec-1.99.32 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.088 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.087 lib/deprec_cmd_completion.sh
deprec-3.1.0.rc16 docs/deprec_cmd_completion.sh
deprec-3.1.0.rc15 docs/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.086 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.085 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.084 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.083 lib/deprec_cmd_completion.sh
le1t0-deprec-2.1.6.082 lib/deprec_cmd_completion.sh
deprec-3.1.0.rc13 docs/deprec_cmd_completion.sh
deprec-3.1.0.rc12 docs/deprec_cmd_completion.sh
deprec-3.1.0.rc11 docs/deprec_cmd_completion.sh
deprec-3.1.0.rc10 docs/deprec_cmd_completion.sh
deprec-3.1.0.rc9 docs/deprec_cmd_completion.sh
deprec-3.1.0.rc8 docs/deprec_cmd_completion.sh
deprec-3.1.0.rc7 docs/deprec_cmd_completion.sh