diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-05-22 20:36:38 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-05-22 20:36:38 +0100 |
commit | 7671fc78cb1f6e26cf7ad29e8bd51743ff2e828e (patch) | |
tree | ca27e254aa1d52dba66dc349d0b89b37ad4ee12f /cliapp.5 | |
parent | 88cc3b44662b5179506e77fb570d75122ecf56e4 (diff) | |
download | cliapp-7671fc78cb1f6e26cf7ad29e8bd51743ff2e828e.tar.gz |
Document subcommands and subcommand help
Diffstat (limited to 'cliapp.5')
-rw-r--r-- | cliapp.5 | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -1,4 +1,4 @@ -.\" Copyright (C) 2011, 2012 Lars Wirzenius + .\" Copyright (C) 2011, 2012 Lars Wirzenius .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by @@ -228,6 +228,33 @@ You would keep the source code for the manual page in and have your Makefile produce .I foo.1 as shown above. +.SS "Subcommands" +.BR cliapp +provides a way for the application to have +.IR subcommands , +in the style of +.BR git (1), +for example. +If the application is called +.IR foo , +then it can have subcommands such as +.IR "foo search" , +and +.IR "foo print" . +The application gets to define the name and meaning of each subcommand. +However, +all settings (options and configuration files) are global, +and can be used with all subcommands. +It is up to each subcommand what settings it obeys. +.PP +If there are any subcommands, +.B cliapp +automatically adds the +.B help +subcommand. +It allows you to get the help text for a specific subommand: +.IR "foo help print" , +for example. .SH FILES .B cliapp reads a list of configuration files at startup, |