Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug#239070: zsh: scp completion expands * too soon (patch)

On Mar 20,  4:42pm, Clint Adams wrote:
} I think the tmda-like thing on the zsh lists probably blocked your
} message, so I'm just going to quote your entire report in reply.

bugs.debian.org is probably going to block _my_ reply next, but I'll try
it anyway.

} On Sat, Mar 20, 2004 at 12:50:08PM -0500, Jay Berkenbilt wrote:
} > 
} > In a recent upgrade to zsh, completion for scp broke when resolving
} > remote files.  There are two problems: wildcards are expanded too
} > soon, and completion through symbolic links to directories doesn't
} > work right (no trailing slash is provided).
} > 
} > Here's the patch.
} > 
} > -    remfiles=(${(M)${(f)"$(_call_program files ssh $args -a -x ${IPREFIX%:} ls -d1F ${(Q)PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)})
} > +    remfiles=(${(M)${(f)"$(ssh $args -a -x ${IPREFIX%:} ls -d1FL ${(Q)PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)})

Thanks, but this is not the right way to fix the first of these two
issues.  The use of "_call_program files" is intentional, and necessary
for certain zstyle settings to work.

The right solution is simply to put double quotes around the "${(Q)...}\*"

Messages sorted by: Reverse Date, Date, Thread, Author