Commit graph

23 commits

Author SHA1 Message Date
Mislav Marohnić
9e4af479da Add command line docs for supported environment variables 2020-07-16 17:46:09 +02:00
Mislav Marohnić
e6083605c5 Fix spacing around gh help sections 2020-07-16 16:41:40 +02:00
Mislav Marohnić
065496781e Add indent helper function 2020-07-16 16:24:25 +02:00
Mislav Marohnić
4e15982046 Fix crash in dedent when blank lines are passed 2020-07-16 16:10:39 +02:00
Shi Han NG
3db8bc654a
dedent flags in rootUsageFunc 2020-07-16 22:04:40 +09:00
Shi Han NG
3fb90b43ba
dedent based on shortest indent 2020-07-16 22:04:10 +09:00
Shi Han NG
c7df292288
strip extra spaces from help texts 2020-07-15 21:38:49 +09:00
Mislav Marohnić
f64e5f16eb Add special case for unsupported gh <command> help 2020-06-16 16:06:51 +02:00
Mislav Marohnić
311536433c The ultimate --help & spelling suggester handler
- short command usage output now lists subcommands instead of flags for
  parent commands

- mistyping a subcommand now results in a non-zero exit status

- requesting `--help` or `-h` for any command now prints help docs on
  stdout and exits with 0
2020-06-16 15:41:46 +02:00
Mislav Marohnić
ce59deb7b3 Show inherited flags in help output 2020-06-16 13:58:31 +02:00
Mislav Marohnić
9c75cff94b Show command usage output on invalid flags being passed 2020-06-16 13:58:01 +02:00
Adam Stiles
ab2540652d Direct users to https url for manual 2020-06-12 07:55:37 -07:00
Mislav Marohnić
d5c4e23ca5 Tweak last few Example sections 2020-06-11 20:36:08 +02:00
Mislav Marohnić
0dfc0f733f Fix indentation of Example blocks
In HTML, `Example` blocks seem to be already injected in fenced Markdown
blocks `` ``` ``, so they don't need to be especially intented.
2020-06-11 20:31:37 +02:00
Mislav Marohnić
99fce24fc8 Fix FLAGS section showing up empty for config get/set
This is because `config get/set` both do have a flag, but it's hidden.
2020-06-11 18:50:18 +02:00
Mislav Marohnić
e6a0c3dc28 Fix EXAMPLES sections of various commands
- Code should be intented per Markdown syntax for a code block. This
  matters when this documentation is rendered to HTML

- Fix some innaccurate usage examples

- Tweak wording, formatting in a few places
2020-06-11 18:47:57 +02:00
Corey Johnson
2fb48e93ed Inline method call 2020-06-10 09:59:40 -07:00
Corey Johnson
4931892cc3 Apply changes that were lost in merge conflict 2020-06-10 09:30:35 -07:00
Corey Johnson
d140ae6f5b Don't show hidden commands 2020-06-10 09:29:34 -07:00
Corey Johnson
30d1257096 Update help output 2020-06-09 13:19:00 -07:00
Corey Johnson
a6948423f4 Update issue and pr help 2020-06-09 09:33:22 -07:00
Corey Johnson
51353c79d6 Use cobra Example field 2020-06-09 08:43:22 -07:00
Corey Johnson
4d182c4314 Better help command 2020-06-04 12:51:26 -07:00