[pacman-dev] [PATCH] [bash_completion] Undeclared local vars/filenames with spaces/other

Andres P stderr at mail.com
Sun May 9 18:30:51 CEST 2010


> On Sat, May 8, 2010 at 10:31 AM, Xavier Chantry <shiningxc at gmail.com> 
wrote:
> >
> >
> > Attached list of changes between maint and master, + the new patch
> > rebased on top of master.
> >
> > Of course if you want to keep working on it, you're very welcome to 
do so :)
> >
>
> What mostly annoyed me with pacman bash completion is the lag/delay on
> completing packages in pacman -S.
> That clearly feels better after your patch, but I've noticed a funny
> problem and different behavior.
>
> I am sitting in my pacman git tree, and wanted to reinstall pacman :
> $ pacman -S pac<tab>
> after your patch :
> $ sudo pacman -S pac
> pacbuild           pacman-contrib     pacman-mirrorlist  paco
>      pacpan             pacupdate
> before :
> $ sudo pacman -S pac
> pacbuild           pacman/            pacman-contrib
> pacman-mirrorlist  paco               pacpan             pacupdate
>
> So actually I couldnt complete pacman with your patch, it proposed me
> pacman- directly.
> The old behavior didnt propose me pacman either, but since it
> hesitated between pacman/ and pacman- , the completion stopped on
> pacman which is the good package name :)
>
> And this weird behavior is because I had a pacman dir in my PWD :
> $ ls -ld pacman/
> drwxr-xr-x 2 xavier users 4096 Sep 23  2009 pacman/

Yeah, that was because of the very last lines on my old patch.

I had something to the effect of:

- complete -o filenames -o plusdirs -F _pacman pacman
+ complete -o filenames -F _pacman pacman

I skipped plusdirs in my new patch so this is now fixed,
Andres P


More information about the pacman-dev mailing list