From: Andrey Borzenkov <arvidjaar@newmail.ru>
To: zsh-workers@sunsite.dk
Subject: Re: [PATCH] _rsync - better rsync:// URL support and other fixes
Date: Sun, 3 Apr 2005 15:34:02 +0400 [thread overview]
Message-ID: <200504031534.05700.arvidjaar@newmail.ru> (raw)
In-Reply-To: <10653.1112094049@trentino.groupinfra.com>
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 29 March 2005 15:00, Oliver Kiddle wrote:
> On 27 Mar, Andrey wrote:
> > Absolutely ugly "compadd -S/ rsync:/" is the only way I know to add word
> > with two slashes without adding blank. Oliver, do you have any idea (the
> > same problem I had in _urpmi too).
>
> It is possible to do:
> compadd -S '' rsync://
>
> Or is there some problem with that?
>
No. Thank you.
The patch also fixes modules completion (broken in my last patch), stripes yet
another MOTD (this starts to be amusing) and turns off rsync warnings.
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCT9StR6LMutpd94wRAkoAAJ9iPfU56lLxnzD7sf/PYI//QDMDyACePDzU
tMs/ttJxgosyiOkUOTLbgBM=
=nDnr
-----END PGP SIGNATURE-----
[-- Attachment #2: _rsync.diff --]
[-- Type: text/x-diff, Size: 1533 bytes --]
Index: Completion/Unix/Command/_rsync
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_rsync,v
retrieving revision 1.21
diff -u -p -r1.21 _rsync
--- Completion/Unix/Command/_rsync 28 Mar 2005 21:02:06 -0000 1.21
+++ Completion/Unix/Command/_rsync 3 Apr 2005 11:30:35 -0000
@@ -13,7 +13,7 @@ _rsync_user_or_host() {
_wanted users expl "user" \
_combination -s '[:@]' "${tag}" users-hosts users -q "$@" -
else
- [[ $words[CURRENT] = rsync://* ]] || rsync='rsync:rsync: compadd -S/ rsync:/'
+ [[ $words[CURRENT] = rsync://* ]] || rsync='rsync:rsync: compadd -S "" rsync://'
_alternative \
'users:user:_users -S @' \
"hosts:host:_hosts -S '$suf'" \
@@ -26,7 +26,7 @@ local expl remfiles remdispf remdispd re
if compset -P '*::*/' || compset -P 'rsync://*/*/'; then
- remfiles=(${${(f)"$(_call_program files rsync ${words[CURRENT]%/*}/)"}:#[ ]*})
+ remfiles=(${${(f)"$(_call_program files rsync ${words[CURRENT]%/*}/ 2>/dev/null)"}:#([ ]|MOTD:)*})
remdispf=(${remfiles:#d*})
remdispd=(${(M)remfiles:#d*})
@@ -41,11 +41,13 @@ elif compset -P 1 '*::' || compset -P 1
local pat=${words[CURRENT]}
- if [[ $pat = *:: ]]; then
+ if [[ $pat = *::* ]]; then
pat=${pat%::*}::
+ else
+ pat=${pat%/*}/
fi
- remfiles=(${${(f)"$(_call_program files rsync $pat)"}:#[ ]*})
+ remfiles=(${${(f)"$(_call_program files rsync $pat 2>/dev/null)"}:#([ ]|MOTD:)*})
remmodules=(${remfiles/[ ]##/:})
prev parent reply other threads:[~2005-04-03 11:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-26 21:36 Andrey Borzenkov
2005-03-29 11:00 ` Oliver Kiddle
2005-03-29 16:01 ` Bart Schaefer
2005-04-03 11:34 ` Andrey Borzenkov [this message]
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=200504031534.05700.arvidjaar@newmail.ru \
--to=arvidjaar@newmail.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).