From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from elephant.ash.relay.mailchannels.net (elephant.ash.relay.mailchannels.net [23.83.222.57]) by sourceware.org (Postfix) with ESMTPS id A37CB3857418 for ; Tue, 3 May 2022 04:57:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A37CB3857418 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D9CFE6C1550 for ; Tue, 3 May 2022 04:57:53 +0000 (UTC) Received: from pdx1-sub0-mail-a305.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 032DE6C1438 for ; Tue, 3 May 2022 04:57:52 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1651553873; a=rsa-sha256; cv=none; b=njjoLJC8p5WzW+FyPdzoVp6Pupyp2oWb5BJTU5ICb0HqXagHca8Cf+8Ujp0PUcNlhgxKGd 0KyLb/2Uv6G4/YFsCLlHxo9ZWGjtjvPYwXHSuDhdFBAtP/80b7VSBWmLNhw6qd+eMM4qVv lXEbVnAchsMOau3jCH2Kzzc6ILWJ6nFdx5uuqG55skY7Ea7y/WuTTGncOqCIgAaGB1SEsI mZt+xKAbUPl3rzA+PKLebCfTsrSrrj+BsB9ewbrd1wvvdiaJZ3zk7hGFgEkowfu2KT+ARC gWhpx70EmCDECHzzCce3h+/suMlnKeWrXbxgW+0iA4I8/YcR3KS9idFI/55r5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1651553873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=//ewDIesjdyyZPH0dEStUeGy6uMYp6FvD2T+G80JgMc=; b=fHlnuKwKpRVGcaZNNNCQHkVRA3HpqhDWCF5q88gL0sW9wkd+BXPMAfxQSPf9K8sTBWlYtQ A+B/qGFxlS2R27nFDUsiQ0GWldVdzi1RTcunH76Ztv7hYMjzFX+TjlC0QEx11Ufw6y+8OP 1g0XJVFw7oEEzYYZrA7pKp6iSL0Z0T2dRiM3DHKN7oxrPATTU3d44dbXBHhDeY0rLBzA6p tKYJr0HPYky6K1OfxW+cOrVbRs3017R8P4j4EyjzNsD/ZhuVxW3W6MTAti1kxK0FuBQtEA V9x2Gou7lORl1+U//MdC5xgZ+xkpuUOAmBWEH9xvAeEoMY8e4lXtbcAvXjLJ0Q== ARC-Authentication-Results: i=1; rspamd-fdd564cbf-w6dqh; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@sourceware.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Befitting-Whistle: 5be63c197db94645_1651553873396_3563311627 X-MC-Loop-Signature: 1651553873396:3516432284 X-MC-Ingress-Time: 1651553873395 Received: from pdx1-sub0-mail-a305.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.96.96.26 (trex/6.7.1); Tue, 03 May 2022 04:57:53 +0000 Received: from rhbox.redhat.com (unknown [1.186.223.145]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a305.dreamhost.com (Postfix) with ESMTPSA id 4KsnlM5RvVz35 for ; Mon, 2 May 2022 21:57:51 -0700 (PDT) From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [PATCH] manual: Clarify that abbreviations of long options are allowed Date: Tue, 3 May 2022 10:27:43 +0530 Message-Id: <20220503045743.2887439-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3493.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NEUTRAL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2022 04:57:59 -0000 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 --- manual/getopt.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manual/getopt.texi b/manual/getopt.texi index 5485fc4694..e58283ab88 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 or is an exact match for some defined option. 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 -- 2.35.1