From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2997 invoked from network); 27 Sep 2004 14:02:17 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Sep 2004 14:02:17 -0000 Received: (qmail 94790 invoked from network); 27 Sep 2004 14:02:11 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Sep 2004 14:02:11 -0000 Received: (qmail 25827 invoked by alias); 27 Sep 2004 14:01:25 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8025 Received: (qmail 25808 invoked from network); 27 Sep 2004 14:01:24 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 Sep 2004 14:01:24 -0000 Received: (qmail 93346 invoked from network); 27 Sep 2004 14:00:25 -0000 Received: from moutng.kundenserver.de (212.227.126.190) by a.mx.sunsite.dk with SMTP; 27 Sep 2004 14:00:23 -0000 Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CBw3C-0005Bj-00 for zsh-users@sunsite.dk; Mon, 27 Sep 2004 16:00:22 +0200 Received: from [217.233.95.185] (helo=buddha.localdomain.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1CBw3B-0001oV-00 for zsh-users@sunsite.dk; Mon, 27 Sep 2004 16:00:21 +0200 Date: Mon, 27 Sep 2004 16:00:24 +0200 From: "Matthias B." Cc: zsh-users@sunsite.dk Subject: Re: completion within word Message-Id: <20040927160024.5a664979@buddha.localdomain.de> In-Reply-To: <17298.1096276791@trentino.logica.co.uk> References: <20040921175108.5a5f7697@buddha.localdomain.de> <20040922045511.GA22277@picard.franken.de> <20040925003747.241f4a2d@buddha.localdomain.de> <17298.1096276791@trentino.logica.co.uk> X-Mailer: Sylpheed version 0.9.8claws (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:95d11223a40b7ac6df081cef1fe1fef2 X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: * X-Spam-Status: No, hits=1.6 required=6.0 tests=RCVD_IN_NJABL,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 1.6 On Mon, 27 Sep 2004 11:19:51 +0200 Oliver Kiddle wrote: > On 25 Sep, "Matthias B." wrote: > > > Okay, I've tried it for a while and I'm not happy with it. I have the > > same problems with it as with the bash programmable completion > > project. Little annoyances everywhere such as "svn import k" > > refusing to complete on files in the current directory and there's > > also the complexity. I feel > > The patch below fixes that particular annoyance. If you let us know > about any other little annoyances, Well, here's another one: man /us refuses to complete /usr. Same for cvs import /us How can you guys live with a system that completely breaks basic path completion? Over 99% of the time I want to complete paths, but seemingly the completion code was written just for the remaining 1%. Are my work patterns so different from everybody else's? >we can either fix them or let you > know how to configure zsh to avoid them. Thanks for the offer, but I just don't have the patience to play beta-tester for the completion code, which would probably require dozens of fixes just to make sure I don't trip over a problem every couple days. Every instance of a non-working completion is a major annoyance for me. I've seen it with bash_completion and I see it again with zsh's completion that for me the benefits simply do not outweigh the annoyances. > I've tended to believe that we > have fewer half-hearted attempts at completion functions than > bash_completion. My problem with bash completion was not half-hearted completion attempts, it was the fact that whenever a specific completion existed for a command, basic path completion for it seemed to be broken. zsh's code seems to suffer from the same problem. And this seems to be not just an issue of a few bugs. It appears to be a conscious and major design decision for both projects, a design decision that is incompatible with my work habits. As I see it, bash_completion and zsh's completion get it all backwards. They offer pathname completion only as a fallback and do even that only when the completion code believes that a pathname makes sense in the appropriate position. I'd like a completion system that works the other way around. Pathname completion should *always* work *unconditionally* and everything else should be offered in addition to it, if the completion code believes it makes sense in the appropriate position. Under *NO* circumstances should the completion code refuse to complete a path, just because it believes (always erroneously!) that I'm trying to do something stupid. But even if the completion system worked the way I want it to, there would still be the complexity argument. It just makes me feel uneasy if just pressing touches who-knows-what files and calls who-knows-what commands. > > So I'm going to live with basic builtin completion. Any chances of > > getting the above completion to work with it? If not, I'd be grateful > > for pointers into the zsh code so that I can see if I can fix it > > myself. > > I'm not entirely sure how to fix that from the builtin completion using > only compctl. As I said, pointers into the zsh code (I mean the C source code) are fine with me. When I press and nothing happens in a situation where bash offers me something useful, that's a bug in zsh that needs to be fixed in the source. > situation. I'd suggest you just try to use the $path array form of $PATH > instead because it is easier to manipulate. Instead of the your line, > you can do: > > path=( $path /bi > or in zsh 4.2: > path+=( /bi I know, but this doesn't help me. I actually encountered this problem with a different variable and only used PATH as an example. Besides, as you've probably noticed already I'm not the kind of person who'll just retrain himself to work around shortcomings of a program. If a program doesn't do what I want, the program has to change. The user is always right! :-) MSB -- A man without light need not fear darkness.