Skip to content

Instantly share code, notes, and snippets.

@zoranzaric
Created December 27, 2010 18:18
Show Gist options
  • Save zoranzaric/756377 to your computer and use it in GitHub Desktop.
Save zoranzaric/756377 to your computer and use it in GitHub Desktop.
_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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment