|
58 | 58 | * [--help|-h|-?] : displays help, usage information |
59 | 59 | * [--log|-l] [quite|normal|verbose]: Control STDOUT log level. |
60 | 60 | * Default: normal. Plugin owner must respect quite mode; but verbose implementation is optional |
| 61 | +* \[--force|-f\]: Force action without prompting e.g. Overwrite (particularly in I/O operations) |
61 | 62 | * Short form: |
62 | 63 | * Mandatory for common options: -i, -o, -r, -v, -h |
63 | 64 | * Suggested for frequent operations |
|
71 | 72 |
|
72 | 73 | - Always, if possible, detect input format from content |
73 | 74 | - Detect --in / --out file or folder based on specified value. If need to disambiguate introduce param (only if no way to infer). |
| 75 | +- Use the input/output stream tables below to guide command line I/O processing |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | +#### Input Stream |
| 80 | + |
| 81 | +| Specified | Expected | Exist | File Action | Folder Action | |
| 82 | +| --------- | -------- | ------ | ----------- | ------------- | |
| 83 | +| Yes | Yes | Yes | OK | OK | |
| 84 | +| Yes | Yes | No | Fail | Fail | |
| 85 | +| No | Yes | Yes/No | STDIN | Fail | |
| 86 | +| Yes | No | Yes/No | Fail | Fail | |
| 87 | +| No | No | Yes/No | OK | OK | |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +#### Output Stream |
| 92 | + |
| 93 | +| Specified | Expected | Exist | File Action | Folder Action | |
| 94 | +| --------- | -------- | ------ | ------------------------------------------------------ | ------------------------------ | |
| 95 | +| Yes | Yes | Yes | if [--force] --> OK (overwrite); otherwise prompt user | Same logic for files in folder | |
| 96 | +| Yes | Yes | No | OK (create) | Fail | |
| 97 | +| No | Yes | Yes/No | STDOUT | Fail | |
| 98 | +| Yes | No | Yes/No | Fail | Fail | |
| 99 | +| No | No | Yes/No | OK | OK | |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
74 | 105 |
|
75 | 106 | ### Standard Command Types |
76 | 107 |
|
|
0 commit comments