You are not logged in.

#1 2006-09-20 19:13:48

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

ZSH tab-completion for pacman

A long while ago, I found a set of functions for zsh tab-completion for pacman in the Arch mailing list archives. I've improved them recently to make it faster (reading files from /var/lib/pacman instead of calling pacman itself).

Anyway, you can find my version in the AUR: zsh-pacman

enjoy!

Offline

#2 2006-09-20 19:40:13

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: ZSH tab-completion for pacman

Great!

...but how to make that work?

What is that to provide specifically?

Offline

#3 2006-09-20 20:40:35

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

Re: ZSH tab-completion for pacman

the package simply installs a set of functions for zsh to interpret when pressing tab after the pacman command. it's installed to /usr/share/zsh/site-functions for you.

simply restart zsh, type pacman -S pa<tab> and you will see a list of all available packages to install that start with pa.

0.2 fixed a bug, but broke most of the script! i fixed it now with 0.3. sorry!

Offline

#4 2006-09-20 20:52:31

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: ZSH tab-completion for pacman

Well, the problem is that it doesn't work here O_o

Offline

#5 2006-09-20 23:48:01

syamajala
Member
From: here, there, everywhere
Registered: 2005-01-25
Posts: 617
Website

Re: ZSH tab-completion for pacman

thats nice. i'll have to try it out sometime

Offline

#6 2006-09-21 00:05:53

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: ZSH tab-completion for pacman

lucke wrote:

Well, the problem is that it doesn't work here O_o

Are you using ZSH instead of the default BASH? This only works with ZSH.

Offline

#7 2006-09-21 03:12:37

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

Re: ZSH tab-completion for pacman

i'm hoping that if enough people like this, it will be included with arch's zsh package. so everyone who tries this out, please say hello, and then we can try convincing the maintainer.

Offline

#8 2006-09-21 07:20:28

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: ZSH tab-completion for pacman

Of course I'm using ZSH. I'm not that retarded yet ;-)

paranoos, could you post your /etc/zsh/zshrc/ and ~/.zshrc? Maybe the truth hides there.

Offline

#9 2006-09-21 09:10:56

smoon
Member
Registered: 2005-08-22
Posts: 468
Website

Re: ZSH tab-completion for pacman

lucke wrote:

Of course I'm using ZSH. I'm not that retarded yet ;-)

paranoos, could you post your /etc/zsh/zshrc/ and ~/.zshrc? Maybe the truth hides there.

Do you have ZSH's completion system loaded?

autoload -U compinit
compinit

Offline

#10 2006-09-21 10:30:21

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: ZSH tab-completion for pacman

Woohoo.

I had only the first line in zshrc. Added the second one and it seems to work.

Thanks.

-edit-

Wee, it's quite lovely. Great job, paranoos.

Now I should seek some decent PID-handling/kill completion solution.

Offline

#11 2006-09-21 13:54:01

djpharoah
Member
From: SoCal
Registered: 2006-06-18
Posts: 185

Re: ZSH tab-completion for pacman

damn - this is what I was waiting for !!!

great job


IBM T41p - 2373-xXx - kernel26thinkpad

Offline

#12 2006-09-21 16:24:20

allucid
Member
Registered: 2006-01-06
Posts: 259

Re: ZSH tab-completion for pacman

Works nice, thank you.

Offline

#13 2006-09-22 02:38:07

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

Re: ZSH tab-completion for pacman

Hahah, so my half finished one in /var/abs/local no longer has to be finished!

Yessssss.

Offline

#14 2006-10-05 13:27:53

pix
Member
Registered: 2005-07-07
Posts: 25

Re: ZSH tab-completion for pacman

I merged zsh-pacman and netcfg completion to a new package on aur.

zsh-completion v0.1 is released !!!!! Let's play with it !


Any resemblance to grammar or spelling mistakes is purely coincidental and independant of the willing of the author

Offline

#15 2006-10-07 01:21:37

deficite
Member
From: Augusta, GA
Registered: 2005-06-02
Posts: 693

Re: ZSH tab-completion for pacman

Sounds nice. I might try out zsh to try this out.

Offline

#16 2006-10-15 22:36:22

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: ZSH tab-completion for pacman

Now that I've finished the first 50 pages of pws's zsh-user-guide I'm also using zsh, but consider the zsh-pacman pkg in aur obsolete, since zsh-completion has the same...

Offline

#17 2006-10-16 05:20:35

F
Member
Registered: 2006-10-09
Posts: 322

Re: ZSH tab-completion for pacman

I get the following error trying to make the package.

[f|~/pkgbuilds]% makepkg PKGBUILD
==> Entering fakeroot environment
==> Making package: zsh-pacman 0.3-1 (Sun Oct 15 13:18:57 PDT 2006)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==> ERROR: _pacman was not found in the build directory and is not a proper URL.
==> Aborting...


Anyone know what's up?

Offline

#18 2006-10-16 06:01:23

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: ZSH tab-completion for pacman

you need to get the whole tarball ( http://aur.archlinux.org/packages/zsh-p … man.tar.gz ), not just the PKGBUILD.

Offline

#19 2006-10-16 06:04:55

diffyQ
Member
From: dc
Registered: 2006-08-29
Posts: 13

Re: ZSH tab-completion for pacman

paranoos wrote:

everyone who tries this out, please say hello

hello!

works great -- thanks.

Offline

#20 2006-10-16 07:16:58

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: ZSH tab-completion for pacman

Been using zsh-pacman for a while, works great, but I'm having some issues with your netcfg completions, stuff like this:

02:14:14 %] iwconfig                                                        [~]
_arguments:comparguments:208: invalid argument: device[device]

·¬»· i am shadowhand, powered by webfaction

Offline

#21 2006-10-16 07:19:34

nicholai
Member
Registered: 2005-04-26
Posts: 51

Re: ZSH tab-completion for pacman

Hi,

This never fails to impress my non-zsh using friends.

Great work,

Nic


Desktop :Athlon64       2.2 GHz
Laptop   :Toshiba R100    1GHz

Offline

#22 2006-10-16 13:12:45

pix
Member
Registered: 2005-07-07
Posts: 25

Re: ZSH tab-completion for pacman

shadowhand wrote:

Been using zsh-pacman for a while, works great, but I'm having some issues with your netcfg completions, stuff like this:

02:14:14 %] iwconfig                                                        [~]
_arguments:comparguments:208: invalid argument: device[device]

This is strange i cant reproduce this bug. Any details ?

Just for informations:

zsh --version                                                    ~
zsh 4.2.6 (i686-pc-linux-gnu)

Any resemblance to grammar or spelling mistakes is purely coincidental and independant of the willing of the author

Offline

#23 2006-10-16 15:55:21

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: ZSH tab-completion for pacman

pix wrote:

This is strange i cant reproduce this bug. Any details ?

Just for informations:

zsh --version                                                    ~
zsh 4.2.6 (i686-pc-linux-gnu)
10:55:06 %] zsh --version                                                   [~]
zsh 4.3.2 (i686-pc-linux-gnu)

·¬»· i am shadowhand, powered by webfaction

Offline

#24 2006-10-16 19:16:07

F
Member
Registered: 2006-10-09
Posts: 322

Re: ZSH tab-completion for pacman

Does this only work as root?

Root uses bash, but my normal users (who can execute pacman fine) run zsh, and the script won't work for them.

Offline

#25 2006-12-19 03:25:41

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

Re: ZSH tab-completion for pacman

Holy hell ZSH is awesome!!!  I just installed the <code>zsh-pacman</code> tab-complete function and wondered why the secondary options aren't working.  I just started messing with ZSH tonight and don't know enough to try and edit the <code>_pacman</code> file myself, but it looks like those things are defined properly, but the options don't show when I do:

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

Any thoughts?

Offline

Board footer

Powered by FluxBB