Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Add missing commands to Debian apt completion



Laurent Arnoud wrote on Tue, Nov 22, 2016 at 19:31:37 +0100:
> +++ b/Completion/Debian/Command/_apt
> @@ -402,17 +402,29 @@ _apt-cmd () {
>      /$'show\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \
> +    /$'showsrc\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \

I had to move the 'showsrc' line to above the 'show' line for «apt
showsrc <TAB>» to work.  Is this expected, or a bug in _apt_arguments
or _regex_arguments?

> +    /$'depends\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \
> +    /$'rdepends\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \
> +    /$'policy\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \

According to your reference, source|build-dep|showsrc|policy should
complete both binary package names and source package names.  It would
be nice to add support for the latter

Thanks for the patch.  Will commit once the show/showsrc issue is
clarified.

Cheers,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author