From debbugs-submit-bounces@debbugs.gnu.org Thu May 06 08:30:02 2010 Received: (at submit) by debbugs.gnu.org; 6 May 2010 12:30:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA0DK-00023J-4r for submit@debbugs.gnu.org; Thu, 06 May 2010 08:30:02 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9zMI-0001d3-4A for submit@debbugs.gnu.org; Thu, 06 May 2010 07:35:14 -0400 Received: from lists.gnu.org ([199.232.76.165]:35044) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O9zMC-0007jh-ME for submit@debbugs.gnu.org; Thu, 06 May 2010 07:35:08 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9yNY-0003LU-TB for bug-coreutils@gnu.org; Thu, 06 May 2010 06:32:29 -0400 Received: from [140.186.70.92] (port=47076 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9yNX-0003KG-G9 for bug-coreutils@gnu.org; Thu, 06 May 2010 06:32:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9yNV-0003xt-W1 for bug-coreutils@gnu.org; Thu, 06 May 2010 06:32:27 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:50301) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9w5m-0003Hq-SI for bug-coreutils@gnu.org; Thu, 06 May 2010 04:06:03 -0400 Received: by gyg4 with SMTP id 4so3881893gyg.0 for ; Thu, 06 May 2010 01:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=4OpL0xHxsSglJ4olMzcBMKw2hd3Zfk54R4xW/+JKSVk=; b=PLPG1NNXiffFUcWXKthQ7X2+cLnKHJmcjPHYkeYIX5uBq4MMrjSCbNYxWLE3Yjr+Oh kbocOUaXdNrwxdsSq6x7K14jPDqQ1vh3mgp7RjHrSeGXiuZZxMoBKO6NAhj2sTQB7H5F OJAO+fkGlMTMO1d39HdB7faQmdRejbP72P2mQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=vTu0rBa7OTn4e9UYpgvatbcpjSPAL60xiyNHefzbBev1vYUOOajvNg+Jx0JT+HYh/Z T6EeKWx3GflFWhA8vixv0cflDq8KNzTN+VTN2/hm7Hw5EYeEzqtqvyt8uA5Ywhd/ayjM 8QKb8eqclKvW5224t2PKPiiZE2jpG6eRtzreQ= Received: by 10.150.118.13 with SMTP id q13mr962347ybc.255.1273133157233; Thu, 06 May 2010 01:05:57 -0700 (PDT) Received: from [129.158.217.234] ([192.9.202.3]) by mx.google.com with ESMTPS id 20sm492623yxe.4.2010.05.06.01.05.55 (version=SSLv3 cipher=RC4-MD5); Thu, 06 May 2010 01:05:56 -0700 (PDT) Subject: [PATCH] Fix indent of --help and --version From: Zhang Sen To: bug-coreutils@gnu.org Content-Type: text/plain; charset="UTF-8" Date: Thu, 06 May 2010 16:00:47 +0800 Message-ID: <1273132847.13190.16.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 06 May 2010 08:30:00 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.7 (----) Hi, >From the several commands I tried, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION don't align well with others in the Usage. $ cat --help -u (ignored) -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB --help display this help and exit --version output version information and exit Here is a trivial patch to make the printing of --help/--version be consistent with other options from Usage. $ cat --help -u (ignored) -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB --help display this help and exit --version output version information and exit Of course the second column is still broken, but I think that's beyond this simple patch. Regards, - jesse >From ba3faa1e0661a6c335a1e7ff525325665a949b79 Mon Sep 17 00:00:00 2001 From: Zhang Sen Date: Thu, 6 May 2010 15:07:18 +0800 Subject: [PATCH] Fix indent of --help and --version Keep consistent with other options, which are printed with two-spaces indent --- src/system.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system.h b/src/system.h index 859b663..811fde9 100644 --- a/src/system.h +++ b/src/system.h @@ -387,9 +387,9 @@ enum "for details about the options it supports.\n") #define HELP_OPTION_DESCRIPTION \ - _(" --help display this help and exit\n") + _(" --help display this help and exit\n") #define VERSION_OPTION_DESCRIPTION \ - _(" --version output version information and exit\n") + _(" --version output version information and exit\n") #include "closein.h" #include "closeout.h" -- 1.7.0.6 From debbugs-submit-bounces@debbugs.gnu.org Thu May 06 12:50:42 2010 Received: (at 6125) by debbugs.gnu.org; 6 May 2010 16:50:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA4Ha-0005Dj-H3 for submit@debbugs.gnu.org; Thu, 06 May 2010 12:50:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA4HX-0005De-PH for 6125@debbugs.gnu.org; Thu, 06 May 2010 12:50:41 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o46GoYfK026806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 May 2010 12:50:34 -0400 Received: from [10.3.241.4] (vpn-241-4.phx2.redhat.com [10.3.241.4]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o46GoXjd026188; Thu, 6 May 2010 12:50:33 -0400 Message-ID: <4BE2F34E.1050209@redhat.com> Date: Thu, 06 May 2010 10:50:22 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Mnenhy/0.8.2 Thunderbird/3.0.4 MIME-Version: 1.0 To: Zhang Sen Subject: Re: bug#6125: [PATCH] Fix indent of --help and --version References: <1273132847.13190.16.camel@localhost.localdomain> In-Reply-To: <1273132847.13190.16.camel@localhost.localdomain> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigA5E53AC657DBAFCC483D4345" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-Spam-Score: -10.0 (----------) X-Debbugs-Envelope-To: 6125 Cc: 6125@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.0 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA5E53AC657DBAFCC483D4345 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/06/2010 02:00 AM, Zhang Sen wrote: > Hi, >=20 >>>From the several commands I tried, HELP_OPTION_DESCRIPTION and > VERSION_OPTION_DESCRIPTION don't align well with others in the Usage. >=20 > $ cat --help > -u (ignored) > -v, --show-nonprinting use ^ and M- notation, except for LFD and TA= B > --help display this help and exit > --version output version information and exit First, thanks for taking the time to contribute, and especially for including a patch. Too many people make requests with no code to back it up. However, I'm hesitant to apply your patch. I see --help output as having three columns - short options, long options, and description. Many options have both short and long (in your example, -v and --show-nonprinting), some have short only (-u), and some have long only (--help). I see nothing wrong with the alignment of the first two columns in the above example, but agree that the third column could be better aligned. I can see your view of --help output having only two columns, and that the leading - should always be aligned, but I'm not sure I agree with it.= >=20 > Here is a trivial patch to make the printing of --help/--version be > consistent with other options from Usage. >=20 > $ cat --help > -u (ignored) > -v, --show-nonprinting use ^ and M- notation, except for LFD and TA= B > --help display this help and exit > --version output version information and exit This is a step backwards in my mind. It mixes column 1 and 2, rather than keeping long options in column 2. >=20 > Of course the second column is still broken, but I think that's beyond > this simple patch. An even nicer fix would be to write a word-wrapping algorithm, that takes $COLUMNS into account, and formats all of the columns (short option, long option, and description) appropriately given the current screen width and maximum length of the long options column. But that means a large rewrite of all of the usage() functions to call this new formatting system. It does sound like a nice project, but it's not my highest priority. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigA5E53AC657DBAFCC483D4345 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL4vNSAAoJEKeha0olJ0Nq1H8H/0UJh+rfOCZ15fyv7qI4Ipc7 WZlIv+cMYRlZY0UR/TYywGLAjiMHAC5CON0LKTYuq2YQt36i4NU71ekI7QjRQ/zl 3eTpxgtEvoDh4OfpzYQx5TxS2c+es6+VKS7YcqYfWv7Yzud3B9sMr8PqVxCz153/ p0akyVzbrKfHdOVvbvO863xaPvpbS/3fBDaP6yqkkCKjykhp4mV4VDuLP7m5Ja0D BbwfR+AWihCk1sYwxSCn0yiTtncBuRo9N2qqzpSAebZpauRODQbEkGzqTrV/Vi6p m7mD/K5cey46bT61D7vO8jpA0tQNn4/dUPxPgseTfGxqh3cD+j/NGB3/XqsX2s8= =uQ5I -----END PGP SIGNATURE----- --------------enigA5E53AC657DBAFCC483D4345-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 06 20:36:11 2010 Received: (at 6125) by debbugs.gnu.org; 7 May 2010 00:36:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OABY2-0000Ex-Sz for submit@debbugs.gnu.org; Thu, 06 May 2010 20:36:11 -0400 Received: from mail-pv0-f172.google.com ([74.125.83.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OABUa-0000DB-O6 for 6125@debbugs.gnu.org; Thu, 06 May 2010 20:32:37 -0400 Received: by pvg13 with SMTP id 13so242088pvg.3 for <6125@debbugs.gnu.org>; Thu, 06 May 2010 17:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=r1jxI92ZD3hQ/euNo0xm0QZCLCp2TrMg/pb48TFPbmw=; b=LUNWb5krJEyOV1sacKyWGRppJPlTTTSS+ctroP4P31/673xFVkf52Blh79DzCjXgfz SnHc741KwJuTVbglIr5bAg868RjVjvDaB8yrcpky0yj0TnhczSCIGGDmofYNHvpGRdsK mJ44TXoLt5wxFtI/6YIaTII+UCLCxPAAy/5GU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=v5fNZ7d0eliIQ8mpst9JkNlpl2eH8nHsLXHBtMRKjAqZax9ReEZsuXBoKk0S5x/4ov +qYdQKoOIEE3oO05MCOEFgv+0+2fe33CU3l3/48YWdT/8FylLrGPG7C5PLHweS8uqQKw iRUrMMW89UlDczKEgb0oSdOXpJ8eWJJC8el4A= Received: by 10.140.55.17 with SMTP id d17mr7194107rva.209.1273192352282; Thu, 06 May 2010 17:32:32 -0700 (PDT) Received: from [192.168.1.100] ([119.255.45.3]) by mx.google.com with ESMTPS id l29sm701517rvb.16.2010.05.06.17.32.29 (version=SSLv3 cipher=RC4-MD5); Thu, 06 May 2010 17:32:31 -0700 (PDT) Subject: Re: bug#6125: [PATCH] Fix indent of --help and --version From: Zhang Sen To: Eric Blake In-Reply-To: <4BE2F34E.1050209@redhat.com> References: <1273132847.13190.16.camel@localhost.localdomain> <4BE2F34E.1050209@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 07 May 2010 08:29:14 +0800 Message-ID: <1273192154.18112.3.camel@zhang-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6125 X-Mailman-Approved-At: Thu, 06 May 2010 20:36:09 -0400 Cc: 6125@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Thu, 2010-05-06 at 10:50 -0600, Eric Blake wrote: > I'm hesitant to apply your patch. > > I see --help output as having three columns - short options, long > options, and description. Many options have both short and long (in > your example, -v and --show-nonprinting), some have short only (-u), and > some have long only (--help). I see nothing wrong with the alignment of > the first two columns in the above example Oops, sorry I missed this. I agree with your view. > An even nicer fix would be to write a word-wrapping algorithm, that > takes $COLUMNS into account, and formats all of the columns (short > option, long option, and description) appropriately given the current > screen width and maximum length of the long options column. But that > means a large rewrite of all of the usage() functions to call this new > formatting system. I will try to see, if this doesn't make the code unnecessarily complex. Thanks, this issue can be closed. - jesse From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 12:17:16 2010 Received: (at control) by debbugs.gnu.org; 14 Jul 2010 16:17:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZ4e4-0007cy-5R for submit@debbugs.gnu.org; Wed, 14 Jul 2010 12:17:16 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OZ4e2-0007cp-IS for control@debbugs.gnu.org; Wed, 14 Jul 2010 12:17:14 -0400 Received: (qmail 3645 invoked from network); 14 Jul 2010 16:17:22 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 14 Jul 2010 16:17:22 -0000 Message-ID: <4C3DE2C4.30000@draigBrady.com> Date: Wed, 14 Jul 2010 17:16:04 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: control@debbugs.gnu.org X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) close 6125 tags 6125 notabug From unknown Wed Jun 25 03:57:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 12 Aug 2010 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator