zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Cc: 243385-forwarded@bugs.debian.org, ejb@ql.org
Subject: [ejb@ql.org: Bug#243385: zsh: rsync completion expands * too soon]
Date: Mon, 12 Apr 2004 21:21:17 -0400	[thread overview]
Message-ID: <20040413012117.GA9729@scowler.net> (raw)

I assume that this is a quoting issue again.

----- Forwarded message from Jay Berkenbilt <ejb@ql.org> -----

Date: Mon, 12 Apr 2004 15:59:30 -0400
From: Jay Berkenbilt <ejb@ql.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Bug#243385: zsh: rsync completion expands * too soon

Package: zsh
Version: 4.1.1-14
Severity: normal
Tags: patch

(Unless zsh-workers has been reconfigured since my last bug report,
the X-Debbugs-CC to zsh-workers will fail and this bug will not have
been reported upstream.)

This is essentially identical to what I reported in Debian bug 239070
for scp: the same bug existed with rsync's completion function.  The
attached patch removes "_call_program files" from the ssh line used to
generate remote files and also adds the -L flag to ls, just like my
earlier patch to _ssh.  I have dispensed with a lengthy explanation
because it is essentially identical to the one I included in bug
239070, the fix to which appears to have been accepted upstream.

This patch is to /usr/share/zsh/4.1.1/functions/Completion/Unix/_rsync.

-------8<--------
--- _rsync~	2004-03-25 13:29:33.000000000 -0500
+++ _rsync	2004-04-09 18:14:08.000000000 -0400
@@ -37,7 +37,7 @@
 
   if zstyle -T ":completion:${curcontext}:" remote-access; then
     slash=/
-    remfiles=(${(f)"$(_call_program files ssh -a -x ${words[CURRENT]%:*} ls -d1F ${${${words[CURRENT
+    remfiles=(${(f)"$(ssh -a -x ${words[CURRENT]%:*} ls -d1FL ${${${words[CURRENT
 ]#*:}:h}/${slash}(#e)/}/\* 2>/dev/null)"})
 
     remdispf=(${remfiles:#*/})
-------8<--------

This patch causes rsync completion to work properly for remote files
when you have ssh access to the remote system.  It still doesn't
behave quite as well as scp completion (rsync host:/path/ TAB doesn't
show alternatives unless you type at least one character after the /),
but at least it behaves as well as it did before the _call_program
function call was added.

A grep for '_call_program files ssh' suggests that this may be the
only place left that has this particular bug.  Too bad I didn't think
to do that last time. :-)

Please let me know if additional information is required or if I
should have repeated the information to substantiate this patch.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.25-1-686-smp
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8

Versions of packages zsh depends on:
ii  debconf                     1.4.16       Debian configuration management sy
ii  libc6                       2.3.2.ds1-11 GNU C Library: Shared libraries an
ii  libcap1                     1:1.10-13    support for getting/setting POSIX.
ii  libncurses5                 5.4-2        Shared libraries for terminal hand
ii  passwd                      1:4.0.3-21   Change and administer password and

-- debconf information:
  zsh/rcmove: 

--- _rsync~	2004-03-25 13:29:33.000000000 -0500
+++ _rsync	2004-04-09 18:14:08.000000000 -0400
@@ -37,7 +37,7 @@
 
   if zstyle -T ":completion:${curcontext}:" remote-access; then
     slash=/
-    remfiles=(${(f)"$(_call_program files ssh -a -x ${words[CURRENT]%:*} ls -d1F ${${${words[CURRENT
+    remfiles=(${(f)"$(ssh -a -x ${words[CURRENT]%:*} ls -d1FL ${${${words[CURRENT
 ]#*:}:h}/${slash}(#e)/}/\* 2>/dev/null)"})
 
     remdispf=(${remfiles:#*/})


----- End forwarded message -----


             reply	other threads:[~2004-04-13  1:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-13  1:21 Clint Adams [this message]
2004-04-13  1:37 ` Jay Berkenbilt
2004-04-13  2:19   ` Clint Adams
2004-04-13 16:17     ` Jay Berkenbilt
2004-04-13 17:44       ` Bart Schaefer
2004-04-13 22:55         ` Clint Adams
2004-04-14 16:37           ` more boring zsh-in-Arch chatter [was Re: [ejb@ql.org: Bug#243385: zsh: rsync completion expands * too soon]] Clint Adams
2004-04-25  2:07             ` more boring zsh-in-Arch chatter Clint Adams

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=20040413012117.GA9729@scowler.net \
    --to=clint@zsh.org \
    --cc=243385-forwarded@bugs.debian.org \
    --cc=ejb@ql.org \
    --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).