Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 2024 14:38:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 282714] /bin/sh doesn't report line numbers correctly when run with the PS4 environment variable
Message-ID:  <bug-282714-227-yhVTrGCZrk@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-282714-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-282714-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282714

Ed Maste <emaste@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |emaste@freebsd.org

--- Comment #1 from Ed Maste <emaste@freebsd.org> ---
There's a reference to LINENO in PS4 in:

commit 292e6676632a8c0ec58ba6a005d2478aa57e799d
Author: Jilles Tjoelker <jilles@FreeBSD.org>
Date:   Thu Jun 9 23:12:23 2011 +0000

    sh: Do parameter expansion before printing PS4 (set -x).

    The function name expandstr() and the general idea of doing this kind of
    expansion by treating the text as a here document without end marker is
from
    dash.

    All variants of parameter expansion and arithmetic expansion also work =
(the
    latter is not required by POSIX but it does not take extra code and many
    other shells also allow it).

    Command substitution is prevented because I think it causes too much co=
de
to
    be re-entered (for example creating an unbounded recursion of trace lin=
es).

    Unfortunately, our LINENO is somewhat crude, otherwise PS4=3D'$LINENO+ '
would
    be quite useful.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-282714-227-yhVTrGCZrk>