From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: problem redeclaring path variable (ksh incompatibility)
Date: Thu, 17 Mar 2005 17:28:47 +0000 [thread overview]
Message-ID: <1050317172847.ZM32649@candle.brasslantern.com> (raw)
In-Reply-To: <1050317165007.ZM32408@candle.brasslantern.com>
On Mar 17, 4:50pm, Bart Schaefer wrote:
}
} If we were going to attempt to change this, the right way would be to add
} a new option, perhaps called LOCAL_SPECIALS, which would be on by default.
} "emulate sh" et al. would unset this option. When NO_LOCAL_SPECIALS, the
} typeset builtin would behave as if the -h option were always present.
}
} Other, less desirable approaches might be to tie this behavior to the
} POSIX_BUILTINS or KSH_TYPESET options. Possibly it should be tied to
} KSH_TYPESET even if LOCAL_SPECIALS is added.
Here's a short patch that illustrates how this would work. With this
patch applied, Michael's function works as he expects, and "typeset +h"
can be used to force a special to remain locally special.
Index: builtin.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/builtin.c,v
retrieving revision 1.30
diff -c -r1.30 builtin.c
--- builtin.c 18 Feb 2005 17:05:15 -0000 1.30
+++ builtin.c 17 Mar 2005 17:23:35 -0000
@@ -2236,6 +2236,9 @@
if (on & PM_TIED)
off |= PM_INTEGER | PM_EFLOAT | PM_FFLOAT | PM_ARRAY | PM_HASHED;
+ if (isset(KSHTYPESET))
+ on |= PM_HIDE;
+
on &= ~off;
queue_signals();
next prev parent reply other threads:[~2005-03-17 17:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-17 14:31 Michael Wardle
2005-03-17 16:50 ` Bart Schaefer
2005-03-17 17:28 ` Bart Schaefer [this message]
2005-03-17 21:42 ` Michael Wardle
2005-03-18 2:42 ` Bart Schaefer
2005-03-18 10:52 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1050317172847.ZM32649@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).