From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17059 invoked from network); 6 Apr 2009 15:49:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Apr 2009 15:49:44 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 54783 invoked from network); 6 Apr 2009 15:49:32 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Apr 2009 15:49:32 -0000 Received: (qmail 9623 invoked by alias); 6 Apr 2009 15:49:11 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14000 Received: (qmail 9608 invoked from network); 6 Apr 2009 15:49:10 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 6 Apr 2009 15:49:10 -0000 Received: from vms173017pub.verizon.net (vms173017pub.verizon.net [206.46.173.17]) by bifrost.dotsrc.org (Postfix) with ESMTP id 57DA182D4B6A for ; Mon, 6 Apr 2009 17:49:05 +0200 (CEST) Received: from torch.brasslantern.com ([96.249.201.13]) by vms173017.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KHO00ETDRX8CZIH@vms173017.mailsrvcs.net> for zsh-users@sunsite.dk; Mon, 06 Apr 2009 10:48:49 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id n36FmhJJ018150 for ; Mon, 06 Apr 2009 08:48:44 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id n36FmhHW018149 for zsh-users@sunsite.dk; Mon, 06 Apr 2009 08:48:43 -0700 From: Bart Schaefer Message-id: <090406084843.ZM18148@torch.brasslantern.com> Date: Mon, 06 Apr 2009 08:48:43 -0700 In-reply-to: <00032557558aadbaa00466e42040@google.com> Comments: In reply to sam.reckoner@gmail.com "rsync hosts completion not working after aliased" (Apr 6, 2:58pm) References: <00032557558aadbaa00466e42040@google.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@sunsite.dk Subject: Re: rsync hosts completion not working after aliased MIME-version: 1.0 Content-type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV 0.92.1/9207/Mon Apr 6 13:58:21 2009 on bifrost X-Virus-Status: Clean 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 - 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= 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.