Zsh Mailing List Archive
Messages sorted by:
Re: rsync hosts completion not working after aliased
- X-seq: zsh-users 14000
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: rsync hosts completion not working after aliased
- Date: Mon, 06 Apr 2009 08:48:43 -0700
- In-reply-to: <00032557558aadbaa00466e42040@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <00032557558aadbaa00466e42040@xxxxxxxxxx>
On Apr 6, 2:58pm, sam.reckoner@xxxxxxxxx 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
torch% rsync -<TAB>
--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
--chmod -- change destination permissions
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
If you instead make it "--chmod Dg-rx,Do-rx" then completion proceeds
[*] 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.
Messages sorted by: