From: Alexey Tourbin <at@altlinux.ru>
To: zsh-workers@sunsite.dk
Subject: Re: zsh-4.2.0-pre-4: problems with _remote_files
Date: Thu, 25 Mar 2004 13:28:54 +0300 [thread overview]
Message-ID: <20040325102854.GA4785@solemn.turbinal.org> (raw)
In-Reply-To: <20040319150721.GG27221@solemn.turbinal.org>
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]
On Fri, Mar 19, 2004 at 06:07:22PM +0300, Alexey Tourbin wrote:
> I've been testing zsh-4.2.0-pre-4 for a while, along with Alexey Voinov.
> We've noticed a few problems with _remote_files completion (ssh).
I've tracked down the problem: using _call_program requires extra
quoting because of additional level of indirection inside eval "$argv".
Here is what happens when _remote_files is invoked.
$ touch \'
$ ssh -a -x localhost ls -d1F \*
<file list> -- works fine
$ _call_program files ssh -a -x localhost ls -d1F \*
zsh: unmatched '
You see, the same command wrapped into _call_program doesn't work.
And what it should be:
$ _call_program files ssh -a -x localhost ls -d1F \\\*
<file list> -- now works
The following patch solves the problem.
--- zsh-4.2.0/Completion/Unix/Command/_ssh- 2004-02-24 13:00:50 +0000
+++ zsh-4.2.0/Completion/Unix/Command/_ssh 2004-03-24 19:55:58 +0000
@@ -6,7 +6,7 @@ _remote_files () {
if zstyle -T ":completion:${curcontext}:files" remote-access; then
zparseopts -D -E -a args p: 1 2 4 6 F:
- remfiles=(${(M)${(f)"$(_call_program files ssh $args -a -x ${IPREFIX%:} ls -d1F ${(Q)PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)})
+ remfiles=(${(M)${(f)"$(_call_program files ssh $args -a -x ${IPREFIX%:} ls -d1F ${(Q)PREFIX%%[^./][^/]#}\\\* 2>/dev/null)"}%%[^/]#(|/)})
compset -P '*/'
compset -S '/*' || suf='remote file'
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-03-25 10:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-19 15:07 Alexey Tourbin
2004-03-25 10:28 ` Alexey Tourbin [this message]
2004-03-25 16:58 ` Bart Schaefer
2004-03-25 20:14 ` Alexey Tourbin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040325102854.GA4785@solemn.turbinal.org \
--to=at@altlinux.ru \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).