From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Martijn Dekker <martijn@inlv.org>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] sh/ksh init: don't initialise lowercase parameters
Date: Wed, 29 Jan 2020 08:49:48 +0000 [thread overview]
Message-ID: <20200129084948.GA9843@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <b7e2e8a2-87a9-49c9-77ff-e612285b7a30@inlv.org>
Martijn Dekker wrote on Tue, Jan 28, 2020 at 16:19:41 +0100:
> In POSIX sh and in ksh, it's the convention that lowercase variable names
> are reserved for scripts, and uppercase names may be used by the shell or
> system.
I wouldn't mind having a test for this. How about:
diff --git a/Test/B07emulate.ztst b/Test/B07emulate.ztst
index 7b1592fa9..28a381aab 100644
--- a/Test/B07emulate.ztst
+++ b/Test/B07emulate.ztst
@@ -276,3 +276,7 @@ F:Some reserved tokens are handled in alias expansion
0:--emulate followed by other options
>yes
>no
+
+ $ZTST_testdir/../Src/zsh --emulate sh -fc 'typeset -pm "[a-z]*"'
+ $ZTST_testdir/../Src/zsh --emulate ksh -fc 'typeset -pm "[a-z]*"'
+0:sh/ksh emulations don't define lowercase variables
> +++ b/Doc/Zsh/compat.yo
> @@ -1173,8 +1173,8 @@ tt(histchars) to characters with a locale-dependent meaning will be
> vindex(HISTCHARS)
> -item(tt(HISTCHARS) <S> <Z>)(
> -Same as tt(histchars). (Deprecated.)
> +item(tt(HISTCHARS) <S>)(
> +Same as tt(histchars).
> )
Why de-deprecate the uppercase spelling? Do ksh or POSIX sh define "HISTCHARS"
in uppercase? The lowercase spelling does seem to be a csh/tcsh thing.
Cheers,
Daniel
next prev parent reply other threads:[~2020-01-29 8:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200128152042eucas1p20cbbeeb7cbe5f6abff08128ba8792661@eucas1p2.samsung.com>
2020-01-28 15:19 ` Martijn Dekker
2020-01-28 15:26 ` Peter Stephenson
2020-01-28 15:45 ` Martijn Dekker
2020-01-29 8:49 ` Daniel Shahaf [this message]
2020-01-29 18:36 ` Bart Schaefer
2020-01-29 21:35 ` Daniel Shahaf
2020-01-29 22:00 ` Bart Schaefer
2020-01-31 4:17 ` Daniel Shahaf
2020-01-31 4:31 ` Bart Schaefer
2020-02-01 9:42 ` Daniel Shahaf
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=20200129084948.GA9843@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=martijn@inlv.org \
--cc=zsh-workers@zsh.org \
/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).