You are not logged in.

#1 2013-07-22 06:41:33

spurious_access
Member
Registered: 2013-02-23
Posts: 15

Is there any way to enable bash completion for AUR package names?

Bash completion doesn't work for any AUR package names in any of the AUR helpers I've tried. For example:

pacaur -S openbo<tab>
will complete to openbox, but

pacaur -S dropbo<tab>
doesn't complete to anything.

I understand why this is the case, pacman caches all the package information from the repos it is configured for, and from the behavior of AUR helpers it seems that they query the AUR every time they need to do a search, so they don't actually know the package names that are available ahead of time. Is there any particular reason for this though? Would it be particularly troublesome to cache the names of all AUR packages for the purpose of bash completion? Is there already an implementation of this I've overlooked?


ghostwheel | Custom | Arch with linux-ck-nehalem |  x86_64 | BIOS | grub2 | systemd | BTRFS | Intel Core i7 920 @ 3.2 GHz | 18GB RAM | 80gb Intel 320 SSD (boot) | 1.5TB 7200 RPM Seagate HDD (storage)

hactar | Google CR-48 | Arch with linux-ck-atom | x86_64 | EFI | grub2 | systemd | ext4  | Intel Atom | 2GB RAM | 64 gb Kingston SSD | Atheros Wireless

Offline

#2 2013-07-22 07:40:41

Awebb
Member
Registered: 2010-05-06
Posts: 6,291

Re: Is there any way to enable bash completion for AUR package names?

You could use bash-completion and write your own "/usr/share/bash-completion/completions/pacaur". However, you would need to create a local list of AUR packages or create a script, that looks it up all the time. This would, however take even longer than the usual local lookup.

Offline

#3 2013-07-22 08:26:17

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: Is there any way to enable bash completion for AUR package names?

spurious_access> completion for AUR packages is implemented in pacaur, but only with the specific AUR command set (-y, -i, ...). It is disabled for commands that access both the repositories and the AUR, because of its slowness. You can however have a look at the completion file (/usr/share/bash-completion/completions/pacaur) and uncomment the relevant line if you want it that way.

As for caching the AUR package names locally, I never thought it would be a realistic, pragmatic solution to this issue.

Offline

Board footer

Powered by FluxBB