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

common CLI conventions?

	I wonder, is there a kind of reference of the common command
	line interface conventions that the CLI's of the software
	included in Debian should adhere to?

	E. g., I see that tree (as of 1.5.3-1) doesn't support the --
	POSIX options' terminator:

$ tree -- . 
tree: Invalid argument -`-'.
usage: tree [-adfghilnpqrstuvxACDFNS] [-H baseHREF] [-T title ] [-L level [-R]]
	[-P pattern] [-I pattern] [-o filename] [--version] [--help] [--inodes]
	[--device] [--noreport] [--nolinks] [--dirsfirst] [--charset charset]
	[--filelimit #] [<directory list>]

	Another issue is that while the majority (in my experience) of
	commands will direct --help's output to stdout, some will use
	stderr instead, which is slightly inconvenient.

	One more issue is that some commands implement GNU long options
	with a particular flaw that --option=ARGUMENT is /not/ accepted
	as synonymous to --option ARGUMENT, which makes it impossible to
	use the following short form:

$ foo --bar={baz,qux} 

	which is, thanks to the Bash syntax, is equivalent to:

$ foo --bar=baz --bar=qux 

	There's even a more subtle issue with the software designed to
	process an arbitrary number of files per run lacking support for
	either of --files-from= or --null options (as implemented by,
	e. g., tar(1)), which leads to an unnecessary constraint on the
	number of files that can be processed in a single run.  (There's
	no need for this feature in cat(1) and the like, though.)

FSF associate member #7257

Reply to: