Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: path PATH
On Sun, Jan 22, 2023 at 11:56 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> On Sun, Jan 22, 2023 at 8:51 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > You can get this by combining -p and -m, which I think is one reason
> > why -m is different.
>
> It's still weird. I would accept this reasoning if `typeset path`
> produced the same output as `typeset -m path` but it doesn't.
Well, the other reason is that "typeset -m" pre-dates "typeset -p" and
had existing expected behavior.
> I don't know. I said it should be (b) because it would be correct by
> design while (q) could only be correct by coincidence.
Fiddling with this and some patterns also brought up another question:
% describe-params 0
scalar-special 0=describe-params
Would it be better to use POSIX_ARGZERO to reveal the name of the
shell itself? There's no way from inside a function to grab $0 from
the caller unless the caller itself asserts NO_FUNCTION_ARGZERO.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author