Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Substitute the last match of a pattern during parameters expansion.



On Tue, Sep 13, 2022, at 12:19 AM, Michele Venturi wrote:
> On Mon, Sep 12, 2022, 08:01,
> Lawrence Velázquez,
> <larryv@xxxxxxx>, wrote:
>
>> But there is already a '%' flag...
>> This doesn't merits a new one.

No, I didn't write that.  What I wrote was: "There is already a '%'
flag.  I do not think this merits a new one."  I intentionally said
"I do not think" to make it clear that that was my personal opinion.

Please do not modify others' words and present the revision as a
quotation.  It's *extremely* poor form.

> What merits a new one then?

There isn't a strict policy or anything, but in my opinion new flags
should only be considered for broadly useful functionality that
cannot be implemented using the existing flags or enhanced versions
of them.  We already have an absurd number of flags; I don't think
new ones should be added willy-nilly.

Your use case could theoretically be satisfied by an enhanced 'I'
flag, so I don't think it deserves its own flag.

> How do you extend the I flag?

I don't know.  I am not familiar with the code base.

-- 
vq




Messages sorted by: Reverse Date, Date, Thread, Author