Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Hiding specials, and namerefs
- X-seq: zsh-workers 54997
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Hiding specials, and namerefs
- Date: Sun, 19 Jul 2026 13:34:28 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=rdFzp36OPW2jjGffs/OkqVgP+1VHFiZ3B4n5kUNMgZA=; fh=BgAYDYpL6Ne/A5nWEMVJiHiBtrz8Imz3uf26RDwgQX4=; b=XFxLgvN7tmlYfuCCzf+0UjjIuvD8rNj6YynoIaU/fi9TBnPE/lhDdMoRozbrixnWMD 46rUpXf3i6DgNkSv6ArZ1j18Dmw7yh8qyfwyu//NxzwCz/H+SN770H5Qmk0NNK4cVI5n I6UTBIw3gsJufHnutFNHF4aB2GxgNqWbSF+DeEtF2nHr7WDutnWf2yJ0VJg4k9NwRchR FIHiWOjEb7CQmyIwswCuARTNcEIxRMBkPWZVbzu/ewoS2oZ01FSxEtVdHdFsAVcDupdG YyAlpcgNqfsoht7JotKzNlkeamxOOXgIEwG4ID+UY38w97S+MrjhIIm2k471hF9xW+wi 4S0A==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1784493281; cv=none; d=google.com; s=arc-20260327; b=ecTT9nExxjUZy4Fc24VHjPKB8T9LB2eEj96bR2sb7/LYESjOQQ42Xe6sn0zpsHqrRB 1j+Vhvv4PuqM5JrBNooG9HhZZz+Y1jPAQB8tcuzHvTJOV4agYa/+VeXtDwe0sYYC4Qhk ZNu/araRwMcHzPDSTEIMU6U3wPdWyAn9JVWKsOTJgRS9CYm1vX10PbKmGKFghyuBncr3 BK7C/53evLAQR8eU+mkHXFI686FYqUP0YSc5dzzHIdl4Mj6/aJ6kFEIHtOVaMnKkPL40 grKZFqWibFEglK0cPsmgZkB0mPXLo45mecB6bWi1kECxamwGzlX+VoxbHo8PyerFa+bk aFDg==
- Archived-at: <https://zsh.org/workers/54997>
- List-id: <zsh-workers.zsh.org>
Consider this:
local_nonspecial() { () {
local -h BUFFER;
local -n BUFFER=CURSOR;
((BUFFER-=3));
} }
zle -N local_nonspecial
Notes:
-- `typeset -hn ...` is not allowed, but can be worked around, so
probably should be allowed?
-- the ZLE parameters are already implicitly local on entry to a
widget function, so declaring them local again (even with -h) doesn't
change anything without introducing another scope.
(Noticed this while checking for side-effects of workers/54809)
Should there be an error or warning when attempting to "de-specialize"
a special parameter in the same scope where it already exists as a
special?
This is similar to this situation:
% typeset -i WATCH
typeset: WATCH: can't change type of autoloaded parameter
Messages sorted by:
Reverse Date,
Date,
Thread,
Author