Sample bash completion rules for redo targets.

This commit is contained in:
Zoran Zaric 2011-01-01 17:15:16 -08:00 committed by Avery Pennarun
commit fa4b64285d

View file

@ -0,0 +1,12 @@
_redo()
{
local cur
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
local targets=$(for t in `ls *.do | sed 's/\.do$//'`; do echo ${t}; done)
COMPREPLY=($(compgen -W "${targets}" $cur))
}
complete -F _redo redo