Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: min() max() math functions (was: Re: Feature request (@M):# with context matches)
- X-seq: zsh-workers 37926
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: min() max() math functions (was: Re: Feature request (@M):# with context matches)
- Date: Mon, 8 Feb 2016 21:22:22 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=xL8z9J/3+LN2qtPBRHUBTKylPHW3dT7jBqrWtEG6XNg=; b=if4oWzb8k16pWWfewlOwjlsX3vILJFXhm+U1bdEItdEn+q7GtBgpMpCe40/o8jfN/g jgQgSFwwpur4LcaxSnUvEirOX8hvzrSCQ8vEYo7eDWQ2RPSnpvb588TBJcDtRL981NAU oLU6WL84GZTdY6E8ZqlAR+XNeCJlDlMJW7dyMQW9vh3XFh6roNzaUAAHZmh3ZABZ7me1 ucqxZkg6vh7Rl54SnajX3aP5YQGMZ/sVSTr9Jldgavq3/+3EF0EyHoBMtiK1+8KDJoYw Fh8VCpCnEpzDKxXuX8roIkN5lddTr528RjUycDJLLJ0AEHX/3GpSkZzV/9q4KVSTWA7C ETqQ==
- In-reply-to: <20160209032308.GA20947@tarsus.local2>
- 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: <CAKc7PVDCOPzbU25+vTAXMQjonS1sznDX_SBq4-8rUZPQewa5Tg@mail.gmail.com> <CAKc7PVAe0N2bp2XS5U4mOKnTgxQRsj4UGy7NQpHput9VsbnAJw@mail.gmail.com> <160130085456.ZM9730__49922.0612728552$1454172936$gmane$org@torch.brasslantern.com> <20160207002212.GC24068@tarsus.local2> <160206170040.ZM1927__13399.3204137825$1454806909$gmane$org@torch.brasslantern.com> <20160209032308.GA20947@tarsus.local2>
[>workers]
On Feb 9, 3:23am, Daniel Shahaf wrote:
}
} I said "built-in" but I meant in zsh/mathfunc, with all other math
} functions, for consistency.
I was talking about zsh/mathfunc, too.
} I suppose I could package them as an autoload. Patch below.
That's what I was going to suggest, even to the creation of Functions/Math/.
} How do I shield zmathfunc against callers that unsetopt functionargzero?
Sticky emulation would do it for you. E.g.
emulate zsh -c 'autoload -U zmathfunc'
Or examine $funcstack[1] instead of $0 (with localoptions noksharrays),
although that introduces a dependence on zsh/parameter.
} I guess I'll have to drop the the multifuncdef usage altogether?
See for example zmv, zcp, zln.
Although it seems an oversight that you can't combine -u and -M for the
functions command.
} +Autoloading tt(zmathfunc) defines the three mathematical functions
You do have to both autoload it and run it, like e.g. "colors". Given
that, why not have zmathfunc perform "zmodload zsh/mathfunc" too?
} +++ b/Doc/Zsh/mod_mathfunc.yo
} +The functions tt(min), tt(max), and tt(sum) are defined not in this module
} +but in the tt(zmathfunc) autoloadable function
Ehh, I'm not sure it's the job of any module's doc to explain what it
does NOT define, much less to cross-reference zshcontrib.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author