You are not logged in.

#26 2007-03-07 00:11:27

Mo
Member
Registered: 2007-01-18
Posts: 92

Re: ZSH tab-completion for pacman

This works fine with "pacman -Q" for me, but not with "pacman -S". What's wrong?

Offline

#27 2007-03-07 03:05:54

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: ZSH tab-completion for pacman

elasticdog wrote:
% pacman -S<TAB>
Sorry, no matches for: `package' or `option'

Any thoughts?

Because this completion doesn't do it character by character, but if you do -S then -l or whatever, with all the extra dashes, it will work.  The completion would need to be rewritten to get the functionality you seek.

Offline

#28 2007-03-08 17:54:07

G_Syme
Member
Registered: 2007-01-04
Posts: 83

Re: ZSH tab-completion for pacman

paranoos wrote:

[...] so everyone who tries this out, please say hello, and then we can try convincing the maintainer.

Hello from over here, too!

I've tried it out a couple of weeks after I've migrated to zsh and it's exactly what I was looking for!

But I think I've encountered a bug with the current version (zsh-pacman 0.3-1):

From "man pacman":

QUERY OPTIONS
[...]
       -p, --file
              Tells pacman that the package supplied on the command line is  a
              file,  not an entry in the database.  Pacman will decompress the
              file and query it.  This is useful with --info and --list.

When using

pacman -Qlp <TAB>

and

pacman -Qip <TAB>

zsh also searches for completions in the database, but should look for a file instead...


The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.

Offline

#29 2007-03-08 19:03:07

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: ZSH tab-completion for pacman

G_Syme wrote:

pacman -Qlp <TAB> and pacman -Qip <TAB>

zsh also searches for completions in the database, but should look for a file instead...

ahh. the script is hardcoded to recognize -Qp as completing a filename, but would not recognize -Qip ... or -Qpi for that matter.

i've fixed the bug! go get zsh-pacman 0.4!

also, for elasticdog, it doesn't complete compound flags, you'll have to type <space><dash> to see a list of sub-flags. fyi, i haven't included --long flags for anything that has a short flag as well - so you won't see -S --refresh.

anyhow, enjoy!

Last edited by paranoos (2007-03-08 19:08:43)

Offline

#30 2007-03-09 00:38:13

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: ZSH tab-completion for pacman

Ahhh...that's cool, thanks for the clarification.  I might dive in and see if I can't get the sub-flags working without the extra dash.

Offline

#31 2007-03-10 05:05:58

Xilon
Member
Registered: 2007-01-01
Posts: 243

Re: ZSH tab-completion for pacman

This isn't exactly on topic, but it's worth a shot. Is there any chance of porting the pacman completion to yaourt? The syntax is identical except that yaourt has a few  more options (I don't think they would affect the completion). It would be much appreciated.

Offline

Board footer

Powered by FluxBB