bug-coreutils
[Top][All Lists]
Advanced

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

Re: Suggestion for rmdir


From: Eric Blake
Subject: Re: Suggestion for rmdir
Date: Sat, 27 Dec 2008 09:41:24 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Adam Jimerson on 12/27/2008 8:36 AM:
>> Thanks for the report.  However, coreutils use GNU getopt semantics, where
>> unambiguous abbreviations of long options are recognized.  Therefore, you
>> need not type the full name, and can get by with:
> 
>> rmdir --i
> 
> If that is the case then can that be added to ether the help, man, or
> info pages?  I am using openSUSE 11.0 with version 6.11 of the GNU Core
> Utilities and non of those pages said that you can shorten it to just
> --i making me think that I had to type the whole thing.

The info pages would be the right place.  This is not specific to
coreutils - ALL clients of getopt_long have this behavior.  But you are
indeed correct that enhancing the 'info coreutils "Common options"' page
to mention that most coreutils understand unambiguous abbreviations would
be a nice addition.

Jim, okay to apply this?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklWWrQACgkQ84KuGfSFAYDKVACeLbnr0wC/WfbVxtFU5oHXJCJk
RksAn15z7ygx8F9Y6wHTK5oJ9C3pLCZ3
=rzcI
-----END PGP SIGNATURE-----
>From 2efe7849fb3a55bbb3cd2e778d969004c0c43d1e Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Sat, 27 Dec 2008 09:38:09 -0700
Subject: [PATCH] doc: mention long option abbreviation

* doc/coreutils.texi (Common options): Give example of
abbreviating options.
* THANKS: Update.
Reported by Adam Jimerson.
---
 THANKS             |    1 +
 doc/coreutils.texi |    9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/THANKS b/THANKS
index d12626c..13faf10 100644
--- a/THANKS
+++ b/THANKS
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 9047925..e2ad1e7 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -673,8 +673,15 @@ Common options
 must appear before its operands, since in some cases the operands
 specify a command that itself contains options.
 
+Most programs that accept long options recognize unambiguous
+abbreviations of those options.  For example, @samp{rmdir
+--ignore-fail-on-non-empty} can be invoked as @samp{rmdir
+--ignore-fail} or even @samp{rmdir --i}.  Ambiguous options, such as
address@hidden --h}, are identified as such.
+
 Some of these programs recognize the @option{--help} and @option{--version}
-options only when one of them is the sole command line argument.
+options only when one of them is the sole command line argument.  For
+these programs, abbreviations of the long options are not recognized.
 
 @table @samp
 
-- 
1.6.0.4


reply via email to

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