groff-commit
[Top][All Lists]
Advanced

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

[groff] 28/35: [chem]: Revise usage message.


From: G. Branden Robinson
Subject: [groff] 28/35: [chem]: Revise usage message.
Date: Tue, 10 Dec 2024 16:35:37 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit fac7cfc88da86ab0862875cfab0a4a127d35adad
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Dec 9 03:01:12 2024 -0600

    [chem]: Revise usage message.
    
    * contrib/chem/chem.pl (usage): Revise usage message.  Organize like
      other groff commands' usage messages.  Use $0 in the synopses for
      consistency with groff's C++ programs.  This also informs the user
      with multiple versions available which they are running.
---
 contrib/chem/ChangeLog |  7 +++++++
 contrib/chem/chem.pl   | 16 ++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/contrib/chem/ChangeLog b/contrib/chem/ChangeLog
index 45e37a721..c7b28686a 100644
--- a/contrib/chem/ChangeLog
+++ b/contrib/chem/ChangeLog
@@ -1,3 +1,10 @@
+2024-12-09  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * chem.pl (usage): Revise usage message.  Organize like other
+       groff commands' usage messages.  Use $0 in the synopses for
+       consistency with groff's C++ programs.  This also informs the
+       user with multiple versions available which they are running.
+
 2024-12-09  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * chem.am (chem): Use sed to replace magic token `@PERL@` with
diff --git a/contrib/chem/chem.pl b/contrib/chem/chem.pl
index d91d6ff4a..1e387149a 100755
--- a/contrib/chem/chem.pl
+++ b/contrib/chem/chem.pl
@@ -1194,19 +1194,19 @@ sub setparams {
 } # setparams()
 
 
+# Use $0 in the usage message for consistency with groff's C++ programs.
+# This also informs the user with multiple versions available which they
+# are running.
 sub usage {
   print <<EOF;
-usage: $chem [file ...]
-usage: $chem { -h | --help | -v | --version }
+usage: $0 [file ...]
+usage: $0 { -v | --version }
+usage: $0 { -h | --help }
 
-$chem is a groff preprocessor for producing chemical structure
+$chem is a groff(1) preprocessor for producing chemical structure
 diagrams.  It produces input for the $makevar{'G'}pic preprocessor.  If
 no file operands are given, or if file is "-", the standard input stream
-is read.
-
-Options:
- -h, --help     Display this message and exit.
- -v, --version  Display version information and exit.
+is read.  See the $chem(1) manual page.
 EOF
 }
 



reply via email to

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