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

Re: PATCH: _apt-get and _deb_packages



In article <19990904104942.B17943@xxxxxxxx>,
  Clint Adams <schizo@xxxxxxxxxx> writes:

> I don't think so.  I frequently use 'install' to upgrade a set of
> packages that are already installed.

Hm. I modified _apt-get to complete installed packages if current word
doesn't match uninstalled packages.

Index: Completion/Debian/_apt-get
===================================================================
RCS file: /projects/zsh/zsh/Completion/Debian/_apt-get,v
retrieving revision 1.1.1.2
diff -u -F^( -r1.1.1.2 _apt-get
--- _apt-get	1999/09/03 23:19:14	1.1.1.2
+++ _apt-get	1999/09/05 15:06:12
@@ -30,7 +30,7 @@
     compadd "$@" - update upgrade dselect-upgrade dist-upgrade install remove source check clean autoclean help
   else
     case "$words[1]" in
-      install) _deb_packages uninstalled "$@";;
+      install) _deb_packages uninstalled "$@" || _deb_packages installed "$@";;
       remove) _deb_packages installed "$@";;
       *) _deb_packages avail "$@";;
     esac
-- 
Tanaka Akira



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