Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parseOpts参数说明修饰加强,支持参数是否是必选 #21

Open
lajabs opened this issue Jul 15, 2013 · 2 comments
Open

parseOpts参数说明修饰加强,支持参数是否是必选 #21

lajabs opened this issue Jul 15, 2013 · 2 comments
Assignees
Labels

Comments

@lajabs
Copy link

lajabs commented Jul 15, 2013

No description provided.

@oldratlee
Copy link
Owner

必选参数有用!

@ghost ghost assigned oldratlee Dec 15, 2013
@oldratlee
Copy link
Owner

你说明参数是指:类型参数,有参数的选项,值只有一个,是吧。

如果是必选的,脚本自己可以判断。

当然,parseOpts支持,可以简化脚本的编写,现在我没有想到好的参数规格描述:

parseOpts "a,a-long:|b:,b-long:!" "$@"

加个感叹号,表示必选? 😄

@oldratlee oldratlee assigned oldratlee and unassigned oldratlee Dec 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants