dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "G.raud" <graud@gmx.com>
To: dash@vger.kernel.org
Subject: Please document the peculiar $ENV processing
Date: Sun, 17 Dec 2017 19:00:34 +0100	[thread overview]
Message-ID: <20171217175910.42kia52d2pfbklyi@gmx.com> (raw)

The processing of the $ENV variable is not at all mentioned in the
manpage.  POSIX only requires that parameter substitution is applied to

In fact in dash the value of $ENV is subject to parameter and command
substitutions and to arithmetic expansion.  This should be documented,
as this behaviour is more complex that what POSIX requires and is
different from other shells: ksh93 and pdksh/mksh additionally subject
it to tilde expansion.

Here is a proposed text change of one sentence:

 If the environment variable ENV is set on entry to an interactive shell,
 or is set in the .profile of a login shell, the shell next reads
-commands from the file named in ENV.
+commands from the file named by ENV after subjecting its value to
+parameter expansion, command substitution and arithmetic expansion.


G.raud Meyer

                 reply	other threads:[~2017-12-17 18:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171217175910.42kia52d2pfbklyi@gmx.com \
    --to=graud@gmx.com \
    --cc=dash@vger.kernel.org \
    --subject='Re: Please document the peculiar $ENV processing' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).