Skip to content

Instantly share code, notes, and snippets.

@fajran
Created February 23, 2009 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fajran/68828 to your computer and use it in GitHub Desktop.
Save fajran/68828 to your computer and use it in GitHub Desktop.
_sedot_pkgs()
{
local cur prev opts base
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
pkgs=$(ls -d /mirror/sedot/pkgs/*/ | while read a; do basename $a; done)
COMPREPLY=($(compgen -W "${pkgs}" -- ${cur}))
return 0
}
complete -F _sedot_pkgs sedot
complete -F _sedot_pkgs sedot-bg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment