groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 10/31: [nroff]: Report only "basename" of $0 in diags.


From: G. Branden Robinson
Subject: [groff] 10/31: [nroff]: Report only "basename" of $0 in diags.
Date: Fri, 12 Jul 2024 16:39:05 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 315ba634a3d5ab14b3d882593cafed0c8bba47ea
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Jul 11 07:25:35 2024 -0500

    [nroff]: Report only "basename" of $0 in diags.
    
    * src/roff/nroff/nroff.sh: Define `prog` variable as only the "basename"
      of argv[0], making diagnostic and usage messages less garrulous.  See
      Savannah #65110.
---
 ChangeLog               | 6 ++++++
 src/roff/nroff/nroff.sh | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 4b9a42562..6cca2f04c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-07-11  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/roff/nroff/nroff.sh: Define `prog` variable as only the
+       "basename" of argv[0], making diagnostic and usage messages less
+       garrulous.  See Savannah #65110.
+
 2024-07-11  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/roff/troff/node.cpp (class composite_node): Declare
diff --git a/src/roff/nroff/nroff.sh b/src/roff/nroff/nroff.sh
index dd48dbf86..b7973b7c9 100644
--- a/src/roff/nroff/nroff.sh
+++ b/src/roff/nroff/nroff.sh
@@ -20,7 +20,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-prog="$0"
+prog=${0##*/}
 
 T=
 Topt=



reply via email to

[Prev in Thread] Current Thread [Next in Thread]