From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 272 invoked by alias); 15 May 2011 01:39:10 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29293 Received: (qmail 21376 invoked from network); 15 May 2011 01:38:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110514183850.ZM15129@torch.brasslantern.com> Date: Sat, 14 May 2011 18:38:50 -0700 In-reply-to: Comments: In reply to Mikael Magnusson "Re: PATCH Re: squeeze-slashes false not working?" (May 14, 8:45pm) References: <20110513191710.657d2f61@pws-pc.ntlworld.com> <20110513195324.6ab90eb2@pws-pc.ntlworld.com> <110513225805.ZM13712@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh workers Subject: Re: PATCH Re: squeeze-slashes false not working? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On May 14, 8:45pm, Mikael Magnusson wrote: } Subject: Re: PATCH Re: squeeze-slashes false not working? } } Okay, lucky for me it was the third zstyle from the top, } zstyle ':completion:*' accept-exact-dirs 'yes' } } I do still want this set, but maybe it can be made not to consider the } empty string an exact dir? } This seems to do it, but I've no idea if it's sane. Sane is a strange } word to use in _path_files though. This change doesn't fix it for me. If I apply your patch and then set accept-exact-dirs yes, then //// completes things in the root between the first and second slashes, but I'm back to /home/// being treated as /home/. There must be something else going on. As an additional observation, even without your patch if I do this: % mkdir /tmp/ff /tmp/ffzz % ls //ff/ I get silent failure. It completes /tmp if either I leave off the trailing slash, or if there is at least one file in one of the directories. I can't tell if this is the expected behavior or not. I suspect that we're also going to run into madness with filesystems where "//" designates a network root or similar. Incidentally with the squeeze-slashes false + path-completion true default behavior repaired, something like this: % ls ////////// Goes off on a merry lark finding all nine-element paths reachable from the root and checking to see if they contain at least one file. This may go wandering happily through networked filesystems and other roads less traveled by, leaving the shell preoccupied and unresponsive for long stretches. We might want to consider changing squeeze-slashes to default to true, given that the shell has been inadvertently behaving that way for quite some time now.