From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2206) id 6850D3858010; Wed, 4 May 2022 10:29:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6850D3858010 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Siddhesh Poyarekar To: glibc-cvs@sourceware.org Subject: [glibc/release/2.34/master] manual: Clarify that abbreviations of long options are allowed X-Act-Checkin: glibc X-Git-Author: Siddhesh Poyarekar X-Git-Refname: refs/heads/release/2.34/master X-Git-Oldrev: 97cb8227b864b8ea0d99a4a50e4163baad3e1c72 X-Git-Newrev: 31af92b9c8cf753992d45c801a855a02060afc08 Message-Id: <20220504102953.6850D3858010@sourceware.org> Date: Wed, 4 May 2022 10:29:53 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2022 10:29:53 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=31af92b9c8cf753992d45c801a855a02060afc08 commit 31af92b9c8cf753992d45c801a855a02060afc08 Author: Siddhesh Poyarekar Date: Wed May 4 15:56:47 2022 +0530 manual: Clarify that abbreviations of long options are allowed The man page and code comments clearly state that abbreviations of long option names are recognized correctly as long as they are unique. Document this fact in the glibc manual as well. Signed-off-by: Siddhesh Poyarekar Reviewed-by: Florian Weimer Reviewed-by: Andreas Schwab (cherry picked from commit db1efe02c9f15affc3908d6ae73875b82898a489) Diff: --- manual/getopt.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manual/getopt.texi b/manual/getopt.texi index 5485fc4694..b4c0b15ac2 100644 --- a/manual/getopt.texi +++ b/manual/getopt.texi @@ -250,7 +250,8 @@ option, and stores the option's argument (if it has one) in @code{optarg}. When @code{getopt_long} encounters a long option, it takes actions based on the @code{flag} and @code{val} fields of the definition of that -option. +option. The option name may be abbreviated as long as the abbreviation is +unique. If @code{flag} is a null pointer, then @code{getopt_long} returns the contents of @code{val} to indicate which option it found. You should