I looked through the Open Group documents that the letters you sent me
pointed to. I'm not clear on whether it's required to reject unknown
arguments starting with a - but not after a --. That would significantly
influence my implementation -- I would prefer to have hostname work like
this:
hostname foo.bar.com
Sets the hostname
hostname --fqdn
retrieves the hostname as an FQDN
hostname -f
ditto
hostname --long-option-I-never-heard-of
rejected with a usage message
hostname -- --long-option-I-never-heard-of
sets the host name to --long-option-I-never-heard-of
But I'm wondering if there might be a reason that coreutils's "hostname"
recognizes
--help and --version but takes --anything-else as being a hostname. Is
there a reference that implies that the current behaviour is preferred?
--Steve Augart
Jim Meyering <[EMAIL PROTECTED]>
10/07/2003 02:50 PM
To: Steven Augart/Watson/Contr/[EMAIL PROTECTED]
cc: [EMAIL PROTECTED], Martin MOKREJ?
<[EMAIL PROTECTED]>
Subject: Re: bug in hostname
Steven Augart <[EMAIL PROTECTED]> wrote:
> Paul Jarc's point that the GNU/Hurd system will need a hostname program
is
> well put. Perhaps we could provide a simple way for more casual users
not
> to install the hostname program. But really, if we add simple support
for
> --fqdn and --short (as well as -f and -s) it would meet my needs.
I'm hoping someone will submit a patch :-)
> Thanks for the warning. I'm not sure what you mean by "Conforming
> Environment". Is there some level of Posix conformance here? At any
> rate, my environment is apparently non-conforming, since the "tail" I
> built is happily taking options like "-1".
>
> Is there an online discussion of the topic you could point me to?
These two give most of the details.
http://mail.gnu.org/archive/html/bug-coreutils/2003-09/msg00085.html
http://mail.gnu.org/archive/html/bug-coreutils/2003-09/msg00087.html
This is becoming a FAQ.
_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils