Human Interface Guidelines for Command Line Applications
Human Interface Guidelines for Command Line Applications. I've always wished that Command Line apps were a little more usable. I think that a few guidelines, if followed would make the command far more approachable and intuitive. The GNU habit of using single dashes for abbreviated arguments and double dashes for full text is handy, but can often be confusing when described in man, info and simple descriptions. I am sure that there is documentation on these design standards for GNU tools, but until I find it, I wanted to post these ideas, based on what I have found useful in the command line apps I have used.
* All programs, when run with no arguments, should not execute but display a simple description and list of common commands.
Example:
$>foo Description:* When running in a non-interactive manner, a command to stop the program should be displayed.foo is a sample application meant to serve as a example of proper command line behavior.Examples:To start foo: foo --start
To start foo with a file: foo --start filename.ext
Example:
$>foo --start* If the program is passed an argument that it does not understand, it should produce a "friendly" error message and display the simple description.
To stop foo, press control+x at any time.
Example 1:
$>foo --barExample 2:
foo does not understand your request to "bar"
Description:
foo is a sample application meant to serve as a example of proper command line behavior.Examples:
To start foo: foo --start
To start foo with a file: foo --start filename.ext
$>foo bar
foo could not find a file named "bar"
Description:
foo is a sample application meant to serve as a example of proper command line behavior.Examples:
To start foo: foo --start
To start foo with a file: foo --start filename.ext