From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 499432ff for ; Wed, 29 Jan 2020 08:50:29 +0000 (UTC) Received: (qmail 21217 invoked by alias); 29 Jan 2020 08:50:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45354 Received: (qmail 9749 invoked by uid 1010); 29 Jan 2020 08:50:24 -0000 X-Qmail-Scanner-Diagnostics: from wout5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25703. spamassassin: 3.4.2. Clear:RC:0(64.147.123.21):SA:0(-2.6/5.0):. Processed in 0.898457 secs); 29 Jan 2020 08:50:24 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrfeehgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjfgesthdttddttdervdenucfhrhhomhepffgrnhhi vghlucfuhhgrhhgrfhcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgeqne cukfhppeejledrudektddrheejrdduudelnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmh gv X-ME-Proxy: Date: Wed, 29 Jan 2020 08:49:48 +0000 From: Daniel Shahaf To: Martijn Dekker Cc: Zsh hackers list Subject: Re: [PATCH] sh/ksh init: don't initialise lowercase parameters Message-ID: <20200129084948.GA9843@tarpaulin.shahaf.local2> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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) )( > -Same as tt(histchars). (Deprecated.) > +item(tt(HISTCHARS) )( > +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