From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28437 invoked by alias); 24 Feb 2018 19:34:28 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23167 Received: (qmail 10046 invoked by uid 1010); 24 Feb 2018 19:34:28 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-4.server.virginmedia.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(80.0.253.68):SA:0(-1.9/5.0):. Processed in 1.269262 secs); 24 Feb 2018 19:34:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) 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_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Originating-IP: [86.21.219.59] X-Authenticated-User: p.w.stephenson@ntlworld.com X-Spam: 0 X-Authority: v=2.3 cv=BpyzP7f5 c=1 sm=1 tr=0 a=utowdAHh8RITBM/6U1BPxA==:117 a=utowdAHh8RITBM/6U1BPxA==:17 a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=pGLkceISAAAA:8 a=CpwGwyvSrSGqICJ4iTwA:9 a=CjuIK1q_8ugA:10 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1519500861; bh=4FtZ7s1UJoVb+Mtv+RvNjOOU/BWBgQ798RVf0Gh7gxs=; h=Date:From:To:Subject:In-Reply-To:References; b=R4Lbnt8NiwcWjDZscgCehdJPC7ucHwc1kfAk2QGXR1/l0KWJ6keN83rnkf+mYp0kZ TRNdK4U5nCOoc30rm5MZ5RcfN32HZyk+K9Fa7CNYXXf2aXrwhA/lZosfiecZYxUKLo uYUdXYTrGEzcoXiVN/dyQLV5ChAlCB2vDm4LwXVA8XK1r+bdwTSpAqlpJSeYJdQ6+m /AFeBcsnMGhWTb4ZTv9NmpnuCTjEYrHgpfpcB19B8/fmQydIpV1rMdc235Eq9UulgI HKs4AmjLwhGA53Et6O18qjswfZx++wPFPs7rtQHgJsSi4OmLgQz4qBLwVVSvtF+hjn WHwtTglzCvgDw== Date: Sat, 24 Feb 2018 19:34:20 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: Dynamic named directories and completion Message-ID: <20180224193420.0d7d7d5c@ntlworld.com> In-Reply-To: References: X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfP1Hs8e5fuOHxTiv1bgwf4tp5KpirmHF7R5Zrh1QjF+FT8I2ZBPrg+r6C3Cao0AnAwUAYIU9NCulJjDLfRcMKLDpWA6A5mKNnBI/7wlfoaZo8nCixQLm 6e7slSit8C5XRVTFHXF/cQmwDfS+uqMXFFVy8FQDS0ZHH/lVrXWqC61JsmngwTzvZDppP3Yewc7StA== On Fri, 23 Feb 2018 09:42:37 -0500 Scott Frazer wrote: > >> cd ~[ccc]/ > >> > >> zsh doesn't give me options for directories under ccc, it thinks '/' is > >> the command I'm trying to complete. Is there a way to make this work? > > > > I don't see anything wrong in your code and for me, it works as you > > expect (zsh 5.4.2). Does "echo ~[ccc]" returns the right value? > > > > Yes, "echo ~[ccc]" works correctly. I'm using zsh 5.3 so maybe there is some > difference there. Perhaps there is some difference in options/modules/etc. If > I cut my .zshrc down to a minimum: There's something screwy here, certainly. I don't think it should be necessary to modify _path_files in 5.3, though, there are certainly cases where you get the right answer, and I think the logic that currently handles ~ at the start should do the right thing here. I've a theory it's down to the completion widget in use, i.e. how completion gets started up. If instead of hitting tab, you type x complete-word --- or instead bind that widget, bindkey '^i' complete-word and then use tab --- does it start working? The default is expand-or-complete, and I believe the expand bit is nixing the completion in this case. (Except we don't really have the word "nix" this side of the Atlantic, so I may be talking nonsense, but it sounded good.) pws