Commit graph

10 commits

Author SHA1 Message Date
Ed Page
3eaf1af052 fix(help): Correctly show help for fake flags 2024-01-08 09:58:42 -06:00
Ed Page
d63106b9f6 docs(cookbook): Allow repeated operators 2024-01-08 09:50:40 -06:00
Ed Page
d53d881e33 docs(cookbook): Demonstrate bad 'find' behavior 2024-01-08 09:48:34 -06:00
Ed Page
36bc641648 fix(help): Remove extraneous text from built-ins
This is an intermediate solution for #4408.  As there were no agreeed
upon goals, I went with what I felt read well and that I saw commonly
used on non-clap commands.

- "information" isn't really a necessary word.
- I originally favored `Print this help` but realied that doesn't read
  correctly in completions.
- Besides being shorter, the reason for the flipped short/long hint is
  it gives people the context they need for scanning, emphasizing
  "summary" and "more".

Fixes #4409
2023-01-03 11:02:26 -06:00
Ed Page
c9eef44213 fix: Make arg!(--flag <value>) optional by default
This was ported over from the usage parser which modeled after docopt.
We just never got around to implementing the rest of the syntax.

However, when considering this as a standalone feature, an
`arg!(--flag <value>)`, outside of other context, should be optional.
This is how the help would display it.

Fixes #4206
2022-09-12 17:10:01 -05:00
Ed Page
c90a4eabae fix(help): Make output more dense
In looking at other help output, I noticed that they use two spaces, in
place of clap's 4, and it doesn't suffer from legibility.  If it
doesn't make the output worse, let's go ahead and make it as dense so we
fit more content on the screen.

This is a part of #4132
2022-09-07 17:13:55 -05:00
Ed Page
9a645d2d19 fix(help): Collapse usage to one line
After looking at more examples, I've become more attached to this
briefer format.

Part of #4132
2022-09-07 11:03:57 -05:00
Ed Page
65b5b5f7bf fix(help): Remove name/version/author from help
This is to help shorten it and polish it by removing redundant
information.

This is a part of #4132
2022-08-31 15:06:15 -05:00
Ed Page
9b23a09f7a fix(help): Don't rely on ALL CAPS for headers
I see them fulfilling two roles
- A form of bolding
- As a callback to their placeholder in usage

However, it is a bit of an unpolished look and no other CLI seems to do
it.  This looks a bit more proefessional.  We have colored help for
formatting and I think the sections relation to usage will be clear
enough.
2022-08-26 10:21:18 -05:00
Ed Page
9c9cc9fcff docs(cookbook): Add position-sensitive example 2022-08-15 10:59:05 -05:00