On Thu, Dec 04, 2008 at 01:06:09PM +0100, Stefano Zacchiroli wrote:
> Package: devscripts
> 
> As per subject, should be pretty easy reusing apt's completion. The
> main thing which needs to get completed is package name (both source
> and binary).

The file of few lines attached perfors completion with package/source name
(the same method aptitude/apt use) of any devscript script that is package
name related, and not only debcheckout (maybe I missed some ones).

Very preliminary version (it should check options of each devscript script)
but already useful (for my own needs at least).

http://people.debian.org/~spaillard/pkg_names_completion

Regards.

-- 
Simon Paillard
_pkg_names() 
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"

    COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )

    return 0
}
complete -F _pkg_names wnpp-alert wnpp-check mk-build-deps rmadison mass-bug 
debsnap dd-list build-rdeps who-uploads transition-check getbuildlog dcontrol 
grep-excuses rc-alert debcheckout mergechanges bts whodepends dget 
pts-subscribe debc pts-unsubscribe

Reply via email to