Replies: 4 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
$ -h|--help
# Command name、选项的 short 和 long 都会有多个值。取第一个为正式名,其余为别名(alias)。在 Usage 中,只使用正式名
Usage: {name} [所有仅有short的选项] [其他选项] [带选项参数] [--] [位置参数] # 可选参数在后
# 带选项参数中,选项和参数要用下划线连接为一个整体
# 如果选项有 short 和 long,那么应当用`|`连接
# 以下,如果选项有 short 和 long,应当用`, `连接
# 别名需要在所有内容输出后,另起一行输出。不管是选项还是Command name,都用`, `连接:`(alias -a, -b, --alias)`, `(alias u, un)`
Options:
...
Options with Arguments:
...
Positional Arguments / Commands:
...
# 选项和可选参数并不以`[]`包围,而是按`Style.new().dim()`显示以上,需要
需要
#20 难搞呀 所有 format 方法都放在一个新的类型中,新类型包含 Meta 或 Command,以及 w,从而避免重复传参 终端属性要如何传递到 format 方法中?新类型中,要包含属性配置 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
提供更清晰简洁的 usage 和 help
Beta Was this translation helpful? Give feedback.
All reactions