From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=DMARC_NONE,MAILING_LIST_MULTI, RDNS_DYNAMIC autolearn=no autolearn_force=no version=4.0.0 Received: from lark.theleaf.office (cable-213-132-142-63.upc.chello.be [213.132.142.63]) by chiba.3jane.net (Postfix) with SMTP id D167A239B0 for ; Fri, 14 Dec 2001 04:07:36 -0600 (CST) Received: (qmail 10120 invoked from network); 14 Dec 2001 10:07:57 -0000 Received: from unknown (HELO gentoo.theleaf.office) (10.1.1.7) by 10.1.1.1 with SMTP; 14 Dec 2001 10:07:57 -0000 Subject: Re: [gentoo-dev] updated emerge bash completion + question From: Geert Bevin To: gentoo-dev@gentoo.org In-Reply-To: <3C1919E5.4010701@shaw.ca> References: <1008246896.1016.10.camel@willow.theleaf.office> <3C1919E5.4010701@shaw.ca> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0 (Preview Release) Date: 14 Dec 2001 11:07:19 +0100 Message-Id: <1008324439.25078.0.camel@gentoo.theleaf.office> Mime-Version: 1.0 Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: gentoo-dev@gentoo.org List-Help: List-Post: List-Subscribe: , List-Id: Developer discussion list List-Unsubscribe: , List-Archive: X-Archives-Salt: b6b523db-08e8-476b-b05a-77b2ca807432 X-Archives-Hash: d82d6a3ff1bc6804c2a405b8c383ddce Well this works, but it doesn't use the bash normal file completion command which imho is not implemented correctly. I don't think that --usepkg should limit itself to the binary packages directory, the completion that follows should be a standard bash file completion. If you see how file completion on other commands has been implemented, then you'll see that they suffer from the same problem (eg. chown chmod ....) I think that the compgen implementation of -f is flawed, it doesn't react any different than -d. I'll try to contact the bash author(s). On Thu, 2001-12-13 at 22:13, Zach Forrest wrote: > This seems to work (see attachment). > > [DISCLAIMER: I make no claims that this is pretty.] > > Geert, > > I think the problem with filename completion when '--usepkg' is > specified has to do with the suffix and glob flags when setting $setsma. > I made a few other changes and was having the same problem (i.e. after > the dirname was completed, it appended a "/" and added a space; > interestingly, though, was that when I backspaced, it then completed on > filenames properly). To get it working, I removed the '-S' flag and > changed the glob pattern to "*/" (only when '--usepkg' is specified, of > course). > > Maybe one of us should mail this addition to the bash_completion > maintainer so it can be included in the main package. (He might also be > able to clean it up a bit. If you'd like to send it in, feel free to > point the finger at me for the hacks. ;-) ) > > Zach -- Geert Bevin the Leaf sprl/bvba "Use what you need" Pierre Theunisstraat 1/47 http://www.theleaf.be 1030 Brussels gbevin@theleaf.be Tel & Fax +32 2 241 19 98