mirror of
https://github.com/clap-rs/clap
synced 2024-11-15 00:57:15 +00:00
36bc641648
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
45 lines
832 B
Markdown
45 lines
832 B
Markdown
`find` is an example of position-sensitive flags
|
|
|
|
```console
|
|
$ find --help
|
|
A simple to use, efficient, and full-featured Command Line Argument Parser
|
|
|
|
Usage: find[EXE] [OPTIONS]
|
|
|
|
Options:
|
|
-h, --help Print help
|
|
-V, --version Print version
|
|
|
|
TESTS:
|
|
--empty File is empty and is either a regular file or a directory
|
|
--name <NAME> Base of file name (the path with the leading directories removed) matches shell
|
|
pattern pattern
|
|
|
|
OPERATORS:
|
|
-o, --or expr2 is not evaluate if exp1 is true
|
|
-a, --and Same as `expr1 expr1`
|
|
|
|
$ find --empty -o --name .keep
|
|
[
|
|
(
|
|
"empty",
|
|
Bool(
|
|
true,
|
|
),
|
|
),
|
|
(
|
|
"or",
|
|
Bool(
|
|
true,
|
|
),
|
|
),
|
|
(
|
|
"name",
|
|
String(
|
|
".keep",
|
|
),
|
|
),
|
|
]
|
|
|
|
```
|
|
|