From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104 invoked by alias); 9 Nov 2009 18:30:20 -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: 27376 Received: (qmail 17708 invoked from network); 9 Nov 2009 18:30:17 -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.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <091109092926.ZM26572@torch.brasslantern.com> Date: Mon, 09 Nov 2009 09:29:26 -0800 In-reply-to: Comments: In reply to Greg Klanderman "Re: bug in 'rm' completion" (Nov 9, 11:17am) References: <19191.43212.832827.724369@gargle.gargle.HOWL> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: gak@klanderman.net, zsh-workers@zsh.org Subject: Re: bug in 'rm' completion MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Nov 9, 11:17am, Greg Klanderman wrote: } } The patch below seems to fix the problem, provided you are completing } the last word on the line. You forgot the patch. } Can someone explain where $line is coming from in _rm? It's declared in both _main_complete and _arguments and appears to be set by "comparguments -W" at _arguments:377. Unfortunately there's no good documentation for "comparguments" because it was treated as a helper builtin that no end user would ever need to call directly. } BTW, what's the deal with _files vs _path_files? The main thing is that _files handles grouping the files according to the files, directories, etc. according to the file-patterns zstyle. _path_files is a lower-level function that manages the path traversal to find appropriate files to complete. Most cases probably ought to be calling _files unless the intent is to impose a different kind of grouping or to avoid having file-patterns applied, but it's a bit of a judgment call in each instance.