| 1 | `find` is an example of position-sensitive flags |
| 2 | |
| 3 | ```console |
| 4 | $ find --help |
| 5 | A simple to use, efficient, and full-featured Command Line Argument Parser |
| 6 | |
| 7 | Usage: find[EXE] [OPTIONS] |
| 8 | |
| 9 | Options: |
| 10 | -h, --help Print help |
| 11 | -V, --version Print version |
| 12 | |
| 13 | TESTS: |
| 14 | --empty File is empty and is either a regular file or a directory |
| 15 | --name <name> Base of file name (the path with the leading directories removed) matches shell |
| 16 | pattern pattern |
| 17 | |
| 18 | OPERATORS: |
| 19 | -o, --or expr2 is not evaluate if exp1 is true |
| 20 | -a, --and Same as `expr1 expr1` |
| 21 | |
| 22 | $ find --empty -o --name .keep |
| 23 | [ |
| 24 | ( |
| 25 | "empty", |
| 26 | Bool( |
| 27 | true, |
| 28 | ), |
| 29 | ), |
| 30 | ( |
| 31 | "or", |
| 32 | Bool( |
| 33 | true, |
| 34 | ), |
| 35 | ), |
| 36 | ( |
| 37 | "name", |
| 38 | String( |
| 39 | ".keep", |
| 40 | ), |
| 41 | ), |
| 42 | ] |
| 43 | |
| 44 | $ find --empty -o --name .keep -o --name foo |
| 45 | [ |
| 46 | ( |
| 47 | "empty", |
| 48 | Bool( |
| 49 | true, |
| 50 | ), |
| 51 | ), |
| 52 | ( |
| 53 | "or", |
| 54 | Bool( |
| 55 | true, |
| 56 | ), |
| 57 | ), |
| 58 | ( |
| 59 | "name", |
| 60 | String( |
| 61 | ".keep", |
| 62 | ), |
| 63 | ), |
| 64 | ( |
| 65 | "or", |
| 66 | Bool( |
| 67 | true, |
| 68 | ), |
| 69 | ), |
| 70 | ( |
| 71 | "name", |
| 72 | String( |
| 73 | "foo", |
| 74 | ), |
| 75 | ), |
| 76 | ] |
| 77 | |
| 78 | ``` |
| 79 |