ls(1) new command line options '-/' and '-%': CIFS system attributes support [PSARC/2007/394 FastTrack timeout 07/11/2007]
Glenn Fowler
gsf at research.att.com
Mon Jul 16 14:10:57 PDT 2007
On Tue, 03 Jul 2007 17:53:17 +0200 Joerg.Schilling at fokus.fraunhofer.de (Joerg Schilling) wrote:
> The POSIX CLI guidlines say that an option should be a single letter and
> should be behind the "-" delimiter.
> - Implementing an option '--foo' would ignore two of the rules from
> the POSIX CLI guidlines.
(late comment due to vacation -- wish it could have been even later ...)
by bending a should, long options can be supported by getopt(3)
just add the single option flag '-' that takes a mandatory value
and use the --name=value form for long options with values
not the way I do it, but also not prohibited by posix
also, the ksh-integration provides getopts(1) and the underlying ast::optget(3)
that provides getopts(1) and getopt(3) compatibility and extensions for long
options, a mechanism for long options with or without a corresponding option flag,
l10n long option translation, and pre-defined { --help --man --html } options
shell scripts using getopts(1) and utilities using optget(3) use the same interface
-- Glenn Fowler -- AT&T Research, Florham Park NJ --
More information about the opensolaris-arc
mailing list