From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23844 invoked by alias); 17 Sep 2014 00:51:23 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19099 Received: (qmail 19113 invoked from network); 17 Sep 2014 00:51:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140916175124.ZM5742@torch.brasslantern.com> Date: Tue, 16 Sep 2014 17:51:24 -0700 In-reply-to: <5418786F.8030001@thregr.org> Comments: In reply to "Yuri D'Elia" "Re: rsync --progress stops completion" (Sep 16, 7:50pm) References: <2002755.9ryFYYVtTN@note> <5418786F.8030001@thregr.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Yuri D'Elia" Subject: Re: rsync --progress stops completion Cc: zsh-users@zsh.org MIME-version: 1.0 Content-type: text/plain; charset=us-ascii (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' \