Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug in 'rm' completion
- X-seq: zsh-workers 27376
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: gak@xxxxxxxxxxxxxx, zsh-workers@xxxxxxx
- Subject: Re: bug in 'rm' completion
- Date: Mon, 09 Nov 2009 09:29:26 -0800
- In-reply-to: <m38wef4qqs.fsf@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <19191.43212.832827.724369@xxxxxxxxxxxxxxxxxx> <m38wef4qqs.fsf@xxxxxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author