cli: improve --color/--colour help & help layout
This commit is contained in:
		
							parent
							
								
									cb599111a6
								
							
						
					
					
						commit
						ba49699728
					
				| @ -161,11 +161,12 @@ m4_define({{_reportingoptions_}}, {{ | |||||||
| : generate future transactions from [periodic transaction](journal.html#periodic-transactions) rules, for the next 6 months or till report end date. | : generate future transactions from [periodic transaction](journal.html#periodic-transactions) rules, for the next 6 months or till report end date. | ||||||
| In hledger-ui, also make ordinary future transactions visible. | In hledger-ui, also make ordinary future transactions visible. | ||||||
| 
 | 
 | ||||||
| `--color=always|yes|never|no|auto (or --colour=...)` | `--color=WHEN (or --colour=WHEN)` | ||||||
| : 'auto' is the default, it tries to use ANSI color codes in terminal output when supported. | : Should color-supporting commands use ANSI color codes in text output. | ||||||
| : 'always' or 'yes' forces color on, useful when piping output, eg into 'less -R'. | : 'auto' (default): whenever stdout seems to be a color-supporting terminal. | ||||||
| : 'never' or 'no' forces color off. | : 'always' or 'yes': always, useful eg when piping output into 'less -R'. | ||||||
| : A NO_COLOR environment variable also disables color, overriding this option. | : 'never' or 'no': never. | ||||||
|  | : A NO_COLOR environment variable overrides this. | ||||||
| 
 | 
 | ||||||
| When a reporting option appears more than once in the command line, the last one takes precedence. | When a reporting option appears more than once in the command line, the last one takes precedence. | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -191,12 +191,13 @@ reportflags = [ | |||||||
| 
 | 
 | ||||||
|   -- general output-related |   -- general output-related | ||||||
| 
 | 
 | ||||||
|  ,flagReq  ["color","colour"] (\s opts -> Right $ setopt "color" s opts) "always|yes|never|no|auto" |  ,flagReq  ["color","colour"] (\s opts -> Right $ setopt "color" s opts) "WHEN" | ||||||
|    (unwords |    (unlines | ||||||
|      ["'auto' is the default, it tries to use ANSI color codes in terminal output when supported." |      ["Should color-supporting commands use ANSI color codes in text output." | ||||||
|      ,"'always' or 'yes' forces color on, useful when piping output, eg into 'less -R'." |      ,"'auto' (default): whenever stdout seems to be a color-supporting terminal." | ||||||
|      ,"'never' or 'no' forces color off." |      ,"'always' or 'yes': always, useful eg when piping output into 'less -R'." | ||||||
|      ,"A NO_COLOR environment variable also disables color, overriding this option." |      ,"'never' or 'no': never." | ||||||
|  |      ,"A NO_COLOR environment variable overrides this." | ||||||
|      ]) |      ]) | ||||||
|  ] |  ] | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user