From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27194 invoked by alias); 23 Apr 2010 21:44:41 -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: X-Seq: 15028 Received: (qmail 25586 invoked from network); 23 Apr 2010 21:44:39 -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: pass (ns1.primenet.com.au: SPF record at ntlworld.com designates 81.103.221.49 as permitted sender) Date: Fri, 23 Apr 2010 22:44:28 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: Zsh autocompletion with no access to a parent directory Message-ID: <20100423224428.7479faa8@pws-pc> In-Reply-To: References: <3663DC29-7A8F-4A0C-8262-5FFE701C8E3A@sysctl.co.uk> <20100413174533.5a15043a@news01> <361816B9-75B6-4C88-8BE9-097B33CA2283@sysctl.co.uk> <201004140914.o3E9EPkL009936@news01.csr.com> <201004140947.o3E9llgG010201@news01.csr.com> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=W3tOLUehizD4qj6VhtReFuw5MKb8d+XqjIxlDsIazEA= c=1 sm=0 a=yCTxJr-a2pMA:10 a=DogomfpGjd0A:10 a=kj9zAlcOel0A:10 a=rUCZ0zD2AAAA:8 a=NLZqzBF-AAAA:8 a=t069SfTUwfyqpItpTMMA:9 a=HcJT-7HRVn4L6jeO_F8A:7 a=PPTfP9GQ7l7HjbQe2E4xS8eXJ9EA:4 a=CjuIK1q_8ugA:10 a=lyVDlEeSCIoA:10 a=_dQi-Dcv4p4A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On Fri, 23 Apr 2010 08:01:53 -0700 Matt Wright wrote: > If you have a path with a "special" character in it, where by special > so far I've found space and tilde, then completion stops offering > results after that letter. It's particularly frustrating on a Mac, where > many app bundles have spaces in their names but the actual executables > are another two layers of directories deeper after the bundle name. It appears to be this, though I haven't looked too closely since I've heard it makes you blind. Where is the input supposed to be unquoted? Er... Index: Completion/Unix/Type/_path_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v retrieving revision 1.50 diff -p -u -r1.50 _path_files --- Completion/Unix/Type/_path_files 14 Apr 2010 09:57:47 -0000 1.50 +++ Completion/Unix/Type/_path_files 23 Apr 2010 21:43:14 -0000 @@ -363,8 +363,8 @@ for prepath in "$prepaths[@]"; do # path prefix first: in the first case, this saves stats in the simple # case and may get around automount behaviour if early components don't # yet exist, and in the second case this is the prefix we want to keep. - tmp1=$match[1] - tpre=$match[2] + tmp1=${(Q)match[1]} + tpre=${(Q)match[2]} while true; do if [[ -z $path_completion || -d $prepath$realpath$donepath$tmp1 ]]; then donepath=$donepath$tmp1/ -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/