Gentoo Archives: gentoo-dev

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

Replies

Subject Author
Re: [gentoo-dev] updated emerge bash completion + question Zach Forrest <diatribe@××××.ca>