This repository has been archived by the owner on Oct 9, 2018. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
R= @ruoru @chentaoyu
Unix 命令行参数标记语法
表达式
表达式 (Expression) 可以是
的任意组合。
表达式以空白字符(空格
\s
,制表符\t
或 换行符\n
) 分割。符号
符号 (Symbol) 是一组被尖括号对 (
<
和>
) 包起来的字符串字面量,例如<username>
或<phone_number>
。通常而言,符号的名字描述了符号所指代内容。可选值
可选值 (Optional) 是一组被方括号对 (
[
和]
) 包起来的表达式,可选值代表了参数中可以被忽略的部分,例如对于[user]name[n]
而言,username
、usernamen
、name
和namen
都是合法的值。枚举值
枚举值 (Enums) 是一组被花括号对 (
{
和}
) 包起来的字面量。枚举值包含了两个或以上可以被接受的值,用竖分隔符 (|
) 分割。字面量
字面量 (Literal) 是命令行参数中既不是符号、也不是可选值或枚举值的字符序列。字面量可以是数字,如
100
,或者是字符串,如abc
。