From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: rsync hosts completion not working after aliased
Date: Mon, 06 Apr 2009 08:48:43 -0700 [thread overview]
Message-ID: <090406084843.ZM18148@torch.brasslantern.com> (raw)
In-Reply-To: <00032557558aadbaa00466e42040@google.com>
On Apr 6, 2:58pm, sam.reckoner@gmail.com wrote:
}
} alias rsync='/bin/rsync -uavz --progress -e ssh --chmod=Dg-rx,Do-rx'
}
} and then it doesn't complete anything, even files. I do _complete_help on
} this and it shows nothing.
I'm not sure why _complete_help shows nothing, but if you try instead to
complete the raw command you can get more details.
There are several problems with the _rsync completer (or that are being
demonstrated by the _rsync completer, anyway). For example, if I first
do:
torch% rsync -<TAB>
Completing option
--8-bit-output -8 -- leave high-bit chars unescaped in ou
--acls -A -- preserve access-control lists
--address -- bind to the specified address
--append -- append data onto shorter files
(etc., scrolls off the page)
OK, I'm in menu selection, as I should be. Mouse around a bit and choose
one of the options and hit enter:
torch% rsync --append
zsh: do you wish to see all 408 possibilities (137 lines)?
It's acting as though I hit TAB again. How did we go straight into list
mode from menu-select?
Anyway, after being sidetracked by that for a bit, we come to the crux
of your problem, which is this:
torch% rsync --append --chmod=<TAB>
torch% rsync --append --chmod
Completing corrections
--chmod -- change destination permissions
Completing original
--chmod=
So the completion function hasn't been told that you can append the set
of modes [*] to the --chmod option with an equal sign, and it gets very
confused trying to find suggested completions for an option whose name
is "chmod=Dg-rx,Do-rx".
If you instead make it "--chmod Dg-rx,Do-rx" then completion proceeds
normally.
[*] The descriptive text for the argument following --chmod says that
it expects "mods". No; it expects "modes". Unix programmers 25 years
ago were vowel-stingy in the name of having less to type.
prev parent reply other threads:[~2009-04-06 15:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 14:58 sam.reckoner
2009-04-06 15:48 ` Bart Schaefer [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=090406084843.ZM18148@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@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).