Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Reserved namespaces
- X-seq: zsh-workers 51565
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Reserved namespaces
- Date: Sun, 12 Mar 2023 12:24:45 -0700
- Archived-at: <https://zsh.org/workers/51565>
- In-reply-to: <CAKc7PVD+-ft3a-D_Y=_cYNf3C+xGBt8mi0Rzf5eXZAPFfcJFBA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7YU4YA7dk20SRyNrvpY9hTqJTf2DkqvA+F=VXT8rVyUuA@mail.gmail.com> <CAKc7PVBKeBprkqnfEbtpLmPyFUZNrBw9qe3cC+YfUU5GUYjk+g@mail.gmail.com> <CAH+w=7bKOeD04ND-x-PNs9P-7a-yVORrqU_G+sQW0zz9M8+66A@mail.gmail.com> <CAKc7PVC_jP7PCbf+bXhQ+oSw_6nJXG1kG+f1tEy2AAxHkzEJMA@mail.gmail.com> <CAKc7PVD+-ft3a-D_Y=_cYNf3C+xGBt8mi0Rzf5eXZAPFfcJFBA@mail.gmail.com>
On Sun, Mar 12, 2023 at 9:46 AM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> Will be creating own namespaces allowed?
Yes ... as of the current patches, namespaces are not significant
except that parameters in namespaces don't show up in "set" /
"typeset" output (unless asked for). It's an unresolved question
whether to implement the ksh "namespace" keyword and its effects.
This thread is about whether (and potentially which) identifiers we
want to declare as reserved for the shell's own purposes. To that end
...
On Fri, Mar 10, 2023 at 8:56 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> It occurs to me that the CORRECT options and their behavior do not
> depend on ZLE being active, so it might not be appropriate to put
> keyboard layouts in that namespace. There are also the parameters
> CORRECT_IGNORE and CORRECT_IGNORE_FILE to consider. Reserving
> "correct" as a namespace feels odd as well, but I think mostly because
> it can be used as both a verb and an adjective. Other ideas?
I'm presently thinking about a namespace "interact" to group variables
that apply only (or mostly) to interactive shells. Then for the
original "Colemak" question we'd have something like:
typeset -gA .interact.keyboards=(
[QWERTY]=$'\n\n\n\n\n\n\n\n\n\n\n\n\n\n'\
$'\t1234567890-=\t'\
$'\tqwertyuiop[]\t'\
$'\tasdfghjkl;\'\n\t'\
$'\tzxcvbnm,./\t\t\t'\
$'\n\n\n\n\n\n\n\n\n\n\n\n\n\n'\
$'\t!@#$%^&*()_+\t'\
$'\tQWERTYUIOP{}\t'\
$'\tASDFGHJKL:\"\n\t'\
$'\tZXCVBNM<>?\n\n\t'\
$'\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
[Dvorak]=$'\n\n\n\n\n\n\n\n\n\n\n\n\n\n'\
$'\t1234567890[]\t'\
$'\t\',.pyfgcrl/=\t'\
$'\taoeuidhtns-\n\t'\
$'\t;qjkxbmwvz\t\t\t'\
$'\n\n\n\n\n\n\n\n\n\n\n\n\n\n'\
$'\t!@#$%^&*(){}\t'\
$'\t\"<>PYFGCRL?+\t'\
$'\tAOEUIDHTNS_\n\t'\
$'\t:QJKXBMWVZ\n\n\t'\
$'\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
[Colemak]=$'\n\n\n\n\n\n\n\n\n\n\n\n\n\n'\
$'\t1234567890-=\t'\
$'\tqwfpgjluy;[]\t'\
$'\tarstdhneio\'\n\t'\
$'\tzxcvbkm,./\t\t\t'\
$'\n\n\n\n\n\n\n\n\n\n\n\n\n\n'\
$'\t!@#$%^&*()_+\t'\
$'\tQWFPGJLUY:{}\t'\
$'\tARSTDHNEIO\"\n\t'\
$'\tZXCVBKM<>?\n\n\t'\
$'\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
)
.interact.layout=${.interact.keyboards[Colemak]}
and change utils.c:spdist() to check getsparam(".interact.layout")
before examining the DVORAK option (for backward compatibility).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author