zsh-workers
 help / color / mirror / code / Atom feed
* Re: Bug#262157: zsh: Missed completion for apt-get install -t unstable
       [not found] <20040729225547.GA3042@ay.vinc17.org>
@ 2004-07-30 15:41 ` Clint Adams
  2004-07-30 17:09   ` Oliver Kiddle
  2004-07-30 17:10   ` Vincent Lefevre
  0 siblings, 2 replies; 4+ messages in thread
From: Clint Adams @ 2004-07-30 15:41 UTC (permalink / raw)
  To: zsh-workers; +Cc: Vincent Lefevre, 262157-forwarded

> I typed
> 
>   apt-get install -t unstable pbb[TAB]
> 
> and zsh completed it to pbbuttonsd-dev, though I wanted to install
> the unstable version of pbbuttonsd.

I see three options:

a) status quo
b) complete pbuttonsd even if it's already installed and pbuttonsd-dev
   matches
c) add intelligence to figure out whether or not one is trying to
   install a different version of an installed package (or the same
   version if --reinstall is given)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug#262157: zsh: Missed completion for apt-get install -t unstable
  2004-07-30 15:41 ` Bug#262157: zsh: Missed completion for apt-get install -t unstable Clint Adams
@ 2004-07-30 17:09   ` Oliver Kiddle
  2004-07-30 17:10   ` Vincent Lefevre
  1 sibling, 0 replies; 4+ messages in thread
From: Oliver Kiddle @ 2004-07-30 17:09 UTC (permalink / raw)
  To: Clint Adams; +Cc: Vincent Lefevre, 262157-forwarded, zsh-workers

Clint wrote:
> >   apt-get install -t unstable pbb[TAB]
> > 
> > and zsh completed it to pbbuttonsd-dev, though I wanted to install
> > the unstable version of pbbuttonsd.
> 
> I see three options:
> 
> a) status quo
> b) complete pbuttonsd even if it's already installed and pbuttonsd-dev
>    matches

It should do that anyway! apt-get install can be used to upgrade a single
package that is already installed. If we don't take account of things
like -t unstable then this option is definitely the way to go.

> c) add intelligence to figure out whether or not one is trying to
>    install a different version of an installed package (or the same
>    version if --reinstall is given)

Good luck making sense of _regex_arguments.

We really ought to rewrite apt-get completion without using
_regex_arguments. _regex_arguments is a nice idea and if it didn't rely
on nasty things like all the nulls, it could be quite good. Would be
nice if apt completion took account of things like --reinstall and used
separate tags for already installed packages and uninstalled ones etc.

It is also the case that stuff like:
_deb_packages_cache_uninstalled=( $(print -l $_deb_packages_cache_avail $_deb_packages_cache_installed|sort|uniq -u) )
is actually faster than the zsh stuff it currently does. We ought to be
careful about blindly assuming the native zsh stuff is quicker.

I've sort of meant to do something about deb completion but I've not
had the time. I also started using aptitude's command-line interface
instead so care less about apt-get. (aptitude seems to be able to
keep track of stuff that was only installed to fulfill a dependency).

Oliver


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug#262157: zsh: Missed completion for apt-get install -t unstable
  2004-07-30 15:41 ` Bug#262157: zsh: Missed completion for apt-get install -t unstable Clint Adams
  2004-07-30 17:09   ` Oliver Kiddle
@ 2004-07-30 17:10   ` Vincent Lefevre
  2004-08-01 14:13     ` Clint Adams
  1 sibling, 1 reply; 4+ messages in thread
From: Vincent Lefevre @ 2004-07-30 17:10 UTC (permalink / raw)
  To: Clint Adams; +Cc: zsh-workers, 262157-forwarded

On 2004-07-30 11:41:11 -0400, Clint Adams wrote:
> I see three options:
> 
> a) status quo
> b) complete pbuttonsd even if it's already installed and pbuttonsd-dev
>    matches
> c) add intelligence to figure out whether or not one is trying to
>    install a different version of an installed package (or the same
>    version if --reinstall is given)

The best solution would be c. If this is too complicated or would
take too much time, at least choose b if the -t option is used.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug#262157: zsh: Missed completion for apt-get install -t unstable
  2004-07-30 17:10   ` Vincent Lefevre
@ 2004-08-01 14:13     ` Clint Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Clint Adams @ 2004-08-01 14:13 UTC (permalink / raw)
  To: Vincent Lefevre, zsh-workers, 262157

> The best solution would be c. If this is too complicated or would
> take too much time, at least choose b if the -t option is used.

Here's the shortcut.


Index: Completion/Debian/Command/_apt
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_apt,v
retrieving revision 1.8
diff -u -r1.8 _apt
--- Completion/Debian/Command/_apt	21 Nov 2003 08:05:43 -0000	1.8
+++ Completion/Debian/Command/_apt	1 Aug 2004 14:09:42 -0000
@@ -423,7 +423,7 @@
     /$'update\0'/ \| \
     /$'upgrade\0'/ \| \
     \( \
-    /$'install\0'/ /$'[^\0]#\0'/ ':packages::{ _deb_packages "$expl_packages[@]" uninstalled || _deb_packages "$expl_packages[@]" installed }' \# \
+    /$'install\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \
     /$'[^\0/]#/'/ /$'[^\0/]#\0'/ ':release name::_apt_releases' \) \| \
     /$'remove\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
     /$'dist-upgrade\0'/ \| \


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-08-01 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20040729225547.GA3042@ay.vinc17.org>
2004-07-30 15:41 ` Bug#262157: zsh: Missed completion for apt-get install -t unstable Clint Adams
2004-07-30 17:09   ` Oliver Kiddle
2004-07-30 17:10   ` Vincent Lefevre
2004-08-01 14:13     ` Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).