doc: more options doc cleanups
This commit is contained in:
		
							parent
							
								
									2cc84f72ed
								
							
						
					
					
						commit
						0055f99c77
					
				| @ -66,16 +66,16 @@ m4_dnl | |||||||
| m4_define({{_helpoptions_}}, {{ | m4_define({{_helpoptions_}}, {{ | ||||||
| 
 | 
 | ||||||
| `-h` | `-h` | ||||||
| : show general usage (or after COMMAND, the command's usage) | : show general usage (or after COMMAND, command usage) | ||||||
| 
 | 
 | ||||||
| `--help` | `--help` | ||||||
| : show the current program's manual as plain text (or after an add-on COMMAND, the add-on's manual) | : show this program's manual as plain text (or after an add-on COMMAND, the add-on's manual) | ||||||
| 
 | 
 | ||||||
| `--man` | `--man` | ||||||
| : show the current program's manual with man | : show this program's manual with man | ||||||
| 
 | 
 | ||||||
| `--info` | `--info` | ||||||
| : show the current program's manual with info | : show this program's manual with info | ||||||
| 
 | 
 | ||||||
| `--version` | `--version` | ||||||
| : show version | : show version | ||||||
|  | |||||||
| @ -102,10 +102,10 @@ import Hledger.Cli.Version | |||||||
| -- | Common help flags: --help, --debug, --version... | -- | Common help flags: --help, --debug, --version... | ||||||
| helpflags :: [Flag RawOpts] | helpflags :: [Flag RawOpts] | ||||||
| helpflags = [ | helpflags = [ | ||||||
|   flagNone ["h"]    (setboolopt "h")    "show general usage or (after CMD, the command's usage" |   flagNone ["h"]    (setboolopt "h")    "show general usage (or after CMD, command usage)" | ||||||
|  ,flagNone ["help"] (setboolopt "help") "show the current program's manual as plain text (or after an addon CMD, the add-on's manual)" |  ,flagNone ["help"] (setboolopt "help") "show this program's manual as plain text (or after an addon CMD, the add-on's manual)" | ||||||
|  ,flagNone ["man"]  (setboolopt "man")  "show the current program's manual with man" |  ,flagNone ["man"]  (setboolopt "man")  "show this program's manual with man" | ||||||
|  ,flagNone ["info"] (setboolopt "info") "show the current program's manual with info" |  ,flagNone ["info"] (setboolopt "info") "show this program's manual with info" | ||||||
|  -- ,flagNone ["browse-args"] (setboolopt "browse-args") "use a web UI to select options and build up a command line" |  -- ,flagNone ["browse-args"] (setboolopt "browse-args") "use a web UI to select options and build up a command line" | ||||||
|  ,flagReq  ["debug"]    (\s opts -> Right $ setopt "debug" s opts) "[N]" "show debug output (levels 1-9, default: 1)" |  ,flagReq  ["debug"]    (\s opts -> Right $ setopt "debug" s opts) "[N]" "show debug output (levels 1-9, default: 1)" | ||||||
|  ,flagNone ["version"] (setboolopt "version") "show version information" |  ,flagNone ["version"] (setboolopt "version") "show version information" | ||||||
|  | |||||||
| @ -28,7 +28,7 @@ import Hledger.Cli.Add ( transactionsSimilarTo ) | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| printmode = (defCommandMode $ ["print"] ++ aliases) { | printmode = (defCommandMode $ ["print"] ++ aliases) { | ||||||
|   modeHelp = "show transaction entries" `withAliases` aliases |   modeHelp = "show transaction journal entries" `withAliases` aliases | ||||||
|  ,modeGroupFlags = Group { |  ,modeGroupFlags = Group { | ||||||
|      groupUnnamed = [ |      groupUnnamed = [ | ||||||
|         let matcharg = "STR" |         let matcharg = "STR" | ||||||
|  | |||||||
| @ -26,8 +26,9 @@ hledger - a command-line accounting tool | |||||||
| 
 | 
 | ||||||
| # SYNOPSIS | # SYNOPSIS | ||||||
| 
 | 
 | ||||||
| `hledger [-f FILE] COMMAND [OPTIONS] [CMDARGS]`\ | `hledger [-f FILE] COMMAND [OPTIONS] [ARGS]`\ | ||||||
| `hledger [-f FILE] ADDONCMD -- [OPTIONS] [CMDARGS]` | `hledger [-f FILE] ADDONCMD -- [OPTIONS] [ARGS]`\ | ||||||
|  | `hledger` | ||||||
| 
 | 
 | ||||||
| # DESCRIPTION | # DESCRIPTION | ||||||
| 
 | 
 | ||||||
| @ -67,8 +68,8 @@ changes existing transactions. | |||||||
| 
 | 
 | ||||||
| To get started, you can either save some entries like the above in | To get started, you can either save some entries like the above in | ||||||
| `~/.hledger.journal`, or run `hledger add` and follow the prompts. Then | `~/.hledger.journal`, or run `hledger add` and follow the prompts. Then | ||||||
| try some commands like `hledger print` or `hledger balance`. See | try some commands like `hledger print` or `hledger balance`. | ||||||
| COMMANDS and EXAMPLES below. | Run `hledger` with no arguments for a list of commands. | ||||||
|   |   | ||||||
| _include_(examples.m4.md) | _include_(examples.m4.md) | ||||||
| _include_(options.m4.md) | _include_(options.m4.md) | ||||||
|  | |||||||
| @ -1,19 +1,42 @@ | |||||||
| # OPTIONS | # OPTIONS | ||||||
| 
 | 
 | ||||||
|  | ## General options | ||||||
|  | 
 | ||||||
| To see general usage help, including general options  | To see general usage help, including general options  | ||||||
| which are supported by most hledger commands, run `hledger -h`. | which are supported by most hledger commands, run `hledger -h`. | ||||||
| (Note -h and --help are different, like git.) | (Note -h and --help are different, like git.) | ||||||
| These options can appear anywhere on the command line, and are listed below. |  | ||||||
| 
 | 
 | ||||||
| To see usage for a specific command, run: `hledger COMMAND -h`. | General help options: | ||||||
|  | 
 | ||||||
|  | _helpoptions_ | ||||||
|  | 
 | ||||||
|  | General input options: | ||||||
|  | 
 | ||||||
|  | _inputoptions_ | ||||||
|  | 
 | ||||||
|  | General reporting options: | ||||||
|  | 
 | ||||||
|  | _reportingoptions_ | ||||||
|  | 
 | ||||||
|  | Note when multiple similar reporting options are provided, the last one takes precedence. | ||||||
|  | Eg `-p feb -p mar` is equivalent to `-p mar`. | ||||||
|  | 
 | ||||||
|  | Some of these can also be written as [queries](#queries). | ||||||
|  | 
 | ||||||
|  | ## Command options | ||||||
|  | 
 | ||||||
|  | To see options for a particular command, including command-specific options, run: `hledger COMMAND -h`. | ||||||
|  | 
 | ||||||
| Command-specific options must be written after the command name, eg: `hledger print -x`. | Command-specific options must be written after the command name, eg: `hledger print -x`. | ||||||
| 
 | 
 | ||||||
| Additionally, if the command is an [add-on](#commands),  | Additionally, if the command is an [addon](#commands),  | ||||||
| you may need to put its options after a double-hyphen, eg: `hledger ui -- --watch`. | you may need to put its options after a double-hyphen, eg: `hledger ui -- --watch`. | ||||||
| Or, you can run the add-on executable directly, eg: `hledger-ui --watch`. | Or, you can run the addon executable directly: `hledger-ui --watch`. | ||||||
| 
 | 
 | ||||||
| Most commands also accept arguments, which are often  | ## Command arguments | ||||||
| a [query](#queries) filtering the data in some way.  | 
 | ||||||
|  | Most hledger commands accept arguments after the command name,  | ||||||
|  | which are often a [query](#queries), filtering the data in some way.  | ||||||
| 
 | 
 | ||||||
| ## Special characters | ## Special characters | ||||||
| 
 | 
 | ||||||
| @ -42,26 +65,6 @@ If in doubt, keep things simple: | |||||||
| 
 | 
 | ||||||
| If you're really stumped, add `--debug=2` to troubleshoot. | If you're really stumped, add `--debug=2` to troubleshoot. | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| ## General options |  | ||||||
| 
 |  | ||||||
| ### General help options |  | ||||||
| 
 |  | ||||||
| _helpoptions_ |  | ||||||
| 
 |  | ||||||
| ### General input options |  | ||||||
| 
 |  | ||||||
| _inputoptions_ |  | ||||||
| 
 |  | ||||||
| ### General reporting options |  | ||||||
| 
 |  | ||||||
| _reportingoptions_ |  | ||||||
| 
 |  | ||||||
| Note when multiple similar reporting options are provided, the last one takes precedence. |  | ||||||
| Eg `-p feb -p mar` is equivalent to `-p mar`. |  | ||||||
| 
 |  | ||||||
| Some of these can also be written as [queries](#queries). |  | ||||||
| 
 |  | ||||||
| ## Input files | ## Input files | ||||||
| 
 | 
 | ||||||
| hledger reads transactions from a data file (and the add command writes to it). | hledger reads transactions from a data file (and the add command writes to it). | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user