From: Bart Schaefer <schaefer@brasslantern.com>
To: "Yuri D'Elia" <wavexx@thregr.org>
Cc: zsh-users@zsh.org
Subject: Re: rsync --progress stops completion
Date: Tue, 16 Sep 2014 17:51:24 -0700 [thread overview]
Message-ID: <140916175124.ZM5742@torch.brasslantern.com> (raw)
In-Reply-To: <5418786F.8030001@thregr.org>
(Wow, gmane sent Yuri's messaeg through with no To/Cc headers.)
On Sep 16, 7:50pm, Yuri D'Elia wrote:
}
} Turns out I had an alias I completely forgot about (shame). It's the
} combination of "-P --progress" that disables the file completion, as I
} see -P removing --progress from the completion list.
}
} I see why it's happening, but somehow feels suboptimal. --progress is a
} legitimate argument even though it's repeated.
Whoever most recently updated the _arguments call in _rsync asserted that
-P and --progress are mutually exclusive. That's intended to prevent the
--progress option from being offered again if you already used -P, I'm
sure, but it also means that the comparguments builtin treats them as
truly mutually exclusive, i.e., the command is wrong if both appear.
Currently _rsync also excludes -P when either of --progress or --partial
already appears, which is probably a mistake.
Ideally comparguments would have a variant of "mutually exclusive" that
simply means "redundant". In the meantime you could locally apply
this patch:
diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync
index 7bad03a..0c3ae44 100644
--- a/Completion/Unix/Command/_rsync
+++ b/Completion/Unix/Command/_rsync
@@ -163,7 +163,7 @@ _rsync() {
'--max-delete=[do not delete more than NUM files]:number' \
'--max-size=[do not transfer any file larger than specified size]:number' \
'--min-size=[do not transfer any file smaller than specified size]:number' \
- '(-P)--partial[keep partially transferred files]' \
+ '--partial[keep partially transferred files]' \
'--no-partial[turn off --partial]' \
'--partial-dir=[put a partially transferred file into specified directory]:directory:_directories' \
'--super[receiver attempts super-user activities]' \
@@ -199,9 +199,9 @@ _rsync() {
'--no-blocking-io[turn off --blocking-io]' \
'--stats[give some file-transfer stats]' \
'(-8 --8-bit-output)'{-8,--8-bit-output}'[leave high-bit chars unescaped in output]' \
- '(-P)--progress[show progress during transfer]' \
+ '--progress[show progress during transfer]' \
'--no-progress[turn off --progress]' \
- '(--partial --progress)-P[same as --partial --progress]' \
+ '-P[same as --partial --progress]' \
'(-i --itemize-changes)'{-i,--itemize-changes}'[output a change-summary for all updates]' \
'--log-format=[deprecated version of --out-format]' \
'--out-format=[output updates using specified format]:format' \
next prev parent reply other threads:[~2014-09-17 0:51 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 15:00 Yuri D'Elia
2014-09-16 15:09 ` Vadim A. Misbakh-Soloviov
2014-09-16 17:50 ` Yuri D'Elia
2014-09-17 0:51 ` Bart Schaefer [this message]
2014-09-17 8:08 ` Yuri D'Elia
2014-09-17 15:51 ` Bart Schaefer
2014-09-18 9:42 ` Yuri D'Elia
2014-09-18 16:36 ` Bart Schaefer
2014-09-19 2:01 ` Bart Schaefer
2014-09-19 3:22 ` Mikael Magnusson
2014-09-19 11:40 ` Oliver Kiddle
2014-09-21 0:48 ` Bart Schaefer
2014-09-20 13:25 ` Yuri D'Elia
2014-09-20 18:20 ` Bart Schaefer
2014-09-21 16:43 ` Yuri D'Elia
2014-09-21 17:20 ` Bart Schaefer
2014-09-21 17:33 ` Yuri D'Elia
2014-09-21 19:38 ` Bart Schaefer
2014-09-21 20:27 ` Yuri D'Elia
2014-09-21 20:37 ` Yuri D'Elia
2014-09-21 22:07 ` Bart Schaefer
2014-09-21 22:29 ` Yuri D'Elia
2014-09-22 6:58 ` Bart Schaefer
2014-09-21 21:08 ` Bart Schaefer
2014-09-21 21:35 ` Yuri D'Elia
2014-09-21 21:54 ` typeset -g (was Re: rsync --progress stops completion) Bart Schaefer
2014-09-21 18:52 ` rsync --progress stops completion Yuri D'Elia
2014-09-21 18:59 ` Yuri D'Elia
2014-09-20 13:20 ` Yuri D'Elia
2014-09-23 14:23 ` Oliver Kiddle
2014-09-23 14:43 ` Peter Stephenson
2014-09-16 15:25 ` Vadim A. Misbakh-Soloviov
2014-09-16 16:28 ` Bart Schaefer
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=140916175124.ZM5742@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=wavexx@thregr.org \
--cc=zsh-users@zsh.org \
/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).