Gentoo Archives: gentoo-dev

From: Zach Forrest <diatribe@××××.ca>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] updated emerge bash completion + question
Date: Fri, 14 Dec 2001 12:33:42
Message-Id: 3C1A46F3.4020706@shaw.ca
In Reply to: Re: [gentoo-dev] updated emerge bash completion + question by Geert Bevin
1 I think you may be right.
2
3 Geert Bevin wrote:
4
5 > Well this works, but it doesn't use the bash normal file completion
6 > command which imho is not implemented correctly. I don't think that
7 > --usepkg should limit itself to the binary packages directory, the
8 > completion that follows should be a standard bash file completion. If
9 > you see how file completion on other commands has been implemented, then
10 > you'll see that they suffer from the same problem (eg. chown chmod ....)
11 > I think that the compgen implementation of -f is flawed, it doesn't
12 > react any different than -d. I'll try to contact the bash author(s).
13 >
14 > On Thu, 2001-12-13 at 22:13, Zach Forrest wrote:
15 >
16 >>This seems to work (see attachment).
17 >>
18 >>[DISCLAIMER: I make no claims that this is pretty.]
19 >>
20 >>Geert,
21 >>
22 >>I think the problem with filename completion when '--usepkg' is
23 >>specified has to do with the suffix and glob flags when setting $setsma.
24 >>I made a few other changes and was having the same problem (i.e. after
25 >>the dirname was completed, it appended a "/" and added a space;
26 >>interestingly, though, was that when I backspaced, it then completed on
27 >>filenames properly). To get it working, I removed the '-S' flag and
28 >>changed the glob pattern to "*/" (only when '--usepkg' is specified, of
29 >>course).
30 >>
31 >>Maybe one of us should mail this addition to the bash_completion
32 >>maintainer so it can be included in the main package. (He might also be
33 >>able to clean it up a bit. If you'd like to send it in, feel free to
34 >>point the finger at me for the hacks. ;-) )
35 >>
36 >>Zach
37 >>