#801432 The word "parameter" is used in an error message instead of "variable"

Package:
dash
Source:
dash
Description:
POSIX-compliant shell
Submitter:
Bjarni Ingi Gislason
Date:
2015-10-26 22:54:05 UTC
Severity:
minor
#801432#5
Date:
2015-10-10 02:30:55 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

  Figuring out an error in "lintian".

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

  Issuing the script

#!/bin/dash
set -u

unset TMPDIR
echo TMPDIR is $TMPDIR

   * What was the outcome of this action?

/home/bg/bin/profa: 5: /home/bg/bin/profa: TMPDIR: parameter not set

   * What outcome did you expect instead?

  The word "variable" instead of the word "parameter".

##

  The double mention of the name of the script is already reported in
the Debian bug #798841 (13th Sept. 2015).

#801432#8
Date:
2015-10-26 22:43:28 UTC
From:
To:
"variable". A variable is a parameter denoted by a name but there are
also parameters denoted by a special character or a positive integer.

Although the man page does not describe this correctly, set -u applies
to all parameters except $@ and $*. This means it detects an attempt to
use an unset positional parameter or to use $! if no background job has
been started yet. In that case, the error message should not contain
"variable".

Dash implements the part about $@ and $* by always considering them as
being set. Per http://austingroupbugs.net/view.php?id=155 , this is
correct for set -u but incorrect in cases like ${*+set} which should
only expand to something if there are positional parameters.

The other special parameters $#, $?, $-, $$ and $0 are always set.