Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: rm(1) completion definition
- X-seq: zsh-workers 25793
- From: "Nikolai Weibull" <now@xxxxxxxx>
- To: "Oliver Kiddle" <okiddle@xxxxxxxxxxx>
- Subject: Re: rm(1) completion definition
- Date: Wed, 1 Oct 2008 15:21:19 +0200
- Cc: "Zsh Workers" <zsh-workers@xxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=KdlHH58oU+HQjBNi3qbZvs3otyXigOIciAvDCsvRNO4=; b=TaCDvcO/0HdX1TfyeyKXtKtrGdmQkAb9tRjy8FkBR2SphwcYfYJO4+RZd8k53mk8XA P7toxmvRyghqtrS2YmfyjJaP/RoI/Sql4DLG4q3TcRDVT+0dHIlFjppduKcUfEux63EW Bwo2SDyPbFgYdOqRr1pvtFID60WsczfRfBvfw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=wfvSU/Q8fnK9o8d0SYe7rhktmfMmb+QUZO5jneiuvRzP/vV2O2H8qKtNRlxAhHsmUu Xcd+2+V3ndv70LGP2xWcHXbDHbJ7SR5PwhfBGJDuBoKmM1dr89d84dRwr0owhqIx+Z/Y rHxQTXpV5a/OWTDP5v+96pL3ZMl4q4Hh3XATA=
- In-reply-to: <12702.1222853932@dcle12>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <dbfc82860809301403v1ac0eb06ha80f01e96c02ab4f@xxxxxxxxxxxxxx> <12702.1222853932@dcle12>
- Sender: nikolai.weibull@xxxxxxxxx
On Wed, Oct 1, 2008 at 11:38, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> Nikolai Weibull wrote:
>> 1. It seems that my trick to disable --force and --recursive on
>> non-GNU systems doesn't work.
> This is better done as:
> args=( ${args:#*--(force|recursive)\[*} )
Thanks, will change to that.
>> 2. I'm not sure if the zstyle thing is correct, but it's definitely
>> what you want it to do. Is there a better way to achieve the same
>> effect?
>
> The problem with the zstyle stuff is that you've used single quotes so
> $curcontext is not expanded.
Duh. Forgot to change that.
> The right way to do this would be to work out exactly what can't be
> completed and build up a suitable glob pattern to pass to _files with
> -g.
Ugh. That sounds complicated.
> One other point: I really hope that running rm --version can't possibly
> actually result in a file or files being removed on some system. I'm a
> bit uneasy about it. Perhaps you should try using rm --help instead
> because there's no `r' in help.
OK, sounds reasonable.
Thank you for your pointers
Messages sorted by:
Reverse Date,
Date,
Thread,
Author