Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: rsync --progress stops completion
- X-seq: zsh-users 19099
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Yuri D'Elia" <wavexx@xxxxxxxxxx>
- Subject: Re: rsync --progress stops completion
- Date: Tue, 16 Sep 2014 17:51:24 -0700
- Cc: zsh-users@xxxxxxx
- In-reply-to: <5418786F.8030001@thregr.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <lv9jav$8l6$1@ger.gmane.org> <2002755.9ryFYYVtTN@note> <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' \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author