Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH 1/3] Extended ksh compatibility: namespace parameter syntax
- X-seq: zsh-workers 51507
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH 1/3] Extended ksh compatibility: namespace parameter syntax
- Date: Sun, 05 Mar 2023 23:24:57 +0100
- Archived-at: <https://zsh.org/workers/51507>
- In-reply-to: <CAH+w=7aqU8B8NAJYD3iAiMRDpGMY=G4oAv6+B+rbdVd_yt6Kyg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7aV2s_+79eCPuavRTiR5wRTwDtTjYxP_VN8HNtL2R5iXw@mail.gmail.com> <26170-1678007435.186071@mDq6.Euc0.bAwZ> <CAH+w=7aqU8B8NAJYD3iAiMRDpGMY=G4oAv6+B+rbdVd_yt6Kyg@mail.gmail.com>
Bart Schaefer wrote:
> Assignment should be possible.
>
> % .foo.bar=something
There must be an off-by-one error in a check:
a.b=c
zsh: command not found: a.b=c
But it does work for anything longer than one character in the first
component such as foo.bar. I was confused when this didn't work for me
this morning because I was sure I had done some tests of assignments.
> Yes, I've been working on doc and tests. One difference that I want
> to add is that parameters starting with "." are omitted from the
> default output of "set" and "typeset" (with no arguments).
Yes, that would be good.
> Given zsh dynamic scoping, it works reasonably well to have ZLE
> variables behave like locals -- you can't access them outside a shell
> function (widget) anyway. If there were controls we wanted to expose
> higher up -- such as, perhaps, fiddling with keymaps without having to
> invoke "zle -K" or "bindkey -[eva]") then yes, a ".zle" namespace
> could be handy.
I was thinking of things like zle_bracketed_paste, zle_highlight and
ZLE_RPROMPT_INDENT which it'd be nice to have more hidden.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author