From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17786 invoked by alias); 6 Sep 2013 01:43:19 -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: 31703 Received: (qmail 6770 invoked from network); 6 Sep 2013 01:43:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) 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, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at m.gmane.org designates 80.91.229.3 as permitted sender) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Jan Larres Subject: Re: Directory completion acts as if CHASE_LINKS is set Date: Fri, 06 Sep 2013 13:42:51 +1200 Message-ID: References: <130905083139.ZM29859@torch.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: yass.opencloud.co.nz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <130905083139.ZM29859@torch.brasslantern.com> On 06/09/13 03:31, Bart Schaefer wrote: > In any case, this is a problem inherent in the way globbing interprets > "../" -- filename generation does not obey the same rules as "cd" path > resolution. > > torch% print ../*(/) > ../bar ../foo > torch% print $PWD:h/*(/) > /tmp/cdtest/foo/baz > > Completion uses globbing to generate the target file names, so this has > to be fixed up somehow in _cd before _path_files is called. > > This patch is a step in the right direction, but has the side-effect of > expanding ".." into $PWD:h which is probably not desirable. There may > be other nuances [particularly with completion in the middle of a word] > that are not handled. So I'm not going to commit it, just presenting it > for purposes of discussion. Thanks, that patch does solve the issue with cd to a certain degree. But as you said yourself it is not specific to cd – for example, 'ls ../[TAB]' has the same problem. So I assume that patching the individual command completions is not the best way to go about it, but I'm not familiar enough with the zsh internals to know what the right way would be. Jan