From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id B0EBE3857C50 for ; Sun, 21 Feb 2021 14:00:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B0EBE3857C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from librem (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 26688301BC17; Sun, 21 Feb 2021 15:00:35 +0100 (CET) Received: by librem (Postfix, from userid 1000) id E8942C1AA5; Sun, 21 Feb 2021 14:59:24 +0100 (CET) Date: Sun, 21 Feb 2021 14:59:24 +0100 From: Mark Wielaard To: Tom Tromey Cc: dwz@sourceware.org Subject: Re: [PATCH v2] Print --version and --help to stdout Message-ID: <20210221135924.GA2992@wildebeest.org> References: <20210221021254.897231-1-tom@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210221021254.897231-1-tom@tromey.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 14:00:38 -0000 Hi Tom, On Sat, Feb 20, 2021 at 07:12:54PM -0700, Tom Tromey wrote: > Normall --version and --help output go to stdout and cause a program > to exit with status 0. The rationale for the exit status is that the > user asked for this behavior, and the program successfully complied. > Printing --help output to stdout is nicer for piping into a pager. > > This patch changes dwz to follow this approach. > > I kept the program invocation name in the Usage line. Different > programs seem to handle this differently. Thanks, consistency between programs is nice here. I like that the usage message goes to stderr when there is a failure, but that it goes to stdout when explicitly requested. Pushed, Mark