Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Zsh autocompletion with no access to a parent directory
- X-seq: zsh-users 15028
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Zsh autocompletion with no access to a parent directory
- Date: Fri, 23 Apr 2010 22:44:28 +0100
- In-reply-to: <C1A23A01-1F48-4C3B-9232-C44EC0AA7C6F@xxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <3663DC29-7A8F-4A0C-8262-5FFE701C8E3A@xxxxxxxxxxxx> <20100413174533.5a15043a@news01> <361816B9-75B6-4C88-8BE9-097B33CA2283@xxxxxxxxxxxx> <201004140914.o3E9EPkL009936@xxxxxxxxxxxxxx> <201004140947.o3E9llgG010201@xxxxxxxxxxxxxx> <C1A23A01-1F48-4C3B-9232-C44EC0AA7C6F@xxxxxxxxxxxx>
On Fri, 23 Apr 2010 08:01:53 -0700
Matt Wright <matt@xxxxxxxxxxxx> 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 <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author