From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29249 invoked by alias); 5 Jan 2014 18:16:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32232 Received: (qmail 9057 invoked from network); 5 Jan 2014 18:16:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Sa/SFF+77ypjxDpWPFWrTmAnHkU19UD5DQuyRdYJXU0=; b=KdAOZ5k35PYR5i4NfcFBxTAXZqhU8bBYB54ShvPFaMki9khG47SHIoxQcsB5vZT4sK XuUt45xcFGUC7IeKRJsgVRWtgltlcGyXTJ7ZouCcJpRmTCRZ3riaFL5GZbDdZmigsij4 Jmm4wSPjTxxrhg5yZ6YC+eBEothvyU+vEc3SPcUlC+g6cDAr2m60mYPfLnWv17yOtdCZ CyqdGNCb1tYROpXfe85btIY4HCdAVAFDhA5wxGp064txTKeuJEYIHubbtkdGnYNzwktz juqtk66+SeQhDdd5zFKFS/hT5d8hVznag5pdlIaltiA4TtpG7y37szlihcPNlVAxHYnM Lwig== X-Gm-Message-State: ALoCoQkTcLK0bOLcBuBFqzuzHi1UEFqTHcJlgf0ur0Zjiv6LvkUPA5y/UiI+fRZY88PKejVCLpSx X-Received: by 10.180.97.39 with SMTP id dx7mr9611516wib.10.1388945764998; Sun, 05 Jan 2014 10:16:04 -0800 (PST) X-ProxyUser-IP: 86.6.157.246 Date: Sun, 5 Jan 2014 18:16:02 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: [PATCH] _chmod: use $line[1] instead of $words[2] to access the mode Message-ID: <20140105181602.5d053392@pws-pc.ntlworld.com> In-Reply-To: <91188AF3-FD51-4C2D-AB3A-8F6DE1FBF658@kba.biglobe.ne.jp> References: <91188AF3-FD51-4C2D-AB3A-8F6DE1FBF658@kba.biglobe.ne.jp> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 5 Jan 2014 21:52:56 +0900 "Jun T." wrote: > BTW, man zshcompsys says, in the description of _arguments, > > During the performance of the action the array `line' will be set to > the command name and normal arguments from the command line, i.e. the > words from the command line excluding all options and their arguments. > > But it seems $line contains only the 'normal arguments', not including > the 'command name'. This is quite hard to verify for sure, since that parameter emerges from the comparguments builtin in Src/Zle/computil.c after some quite major engineering works, but it certainly looks plausible indepdendently of your testing --- my reading is that everything that happens in the code is associated with arguments that map onto something specified by the _arguments call, which don't include the command name that triggered completion. I've submitted a change. pws