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

Update Chinese README for #1010 (.name and .usage) #1014

Closed
shadowspawn opened this issue Aug 11, 2019 · 4 comments
Closed

Update Chinese README for #1010 (.name and .usage) #1014

shadowspawn opened this issue Aug 11, 2019 · 4 comments
Assignees

Comments

@shadowspawn
Copy link
Collaborator

I updated the README in #1010 which has been merged to the develop branch.

I made the format changes in #1013 for the Chinese README but just copied the english text for the new section in the help.

A Pull Request, or just a translation of that section, is welcome.

@shadowspawn shadowspawn changed the title Update Chinese README for #1010 (.name and .usage) Update Chinese README for #1010 (.name and .usage) Aug 11, 2019
@shadowspawn
Copy link
Collaborator Author

### .usage and .name

 These allow you to customise the usage description in the first line of the help. The name is otherwise
 deduced from the (full) program arguments. Given:

 ```js
 program
   .name("my-command")
   .usage("[global options] command")
 ```

 The help will start with:

 ```Text
 Usage: my-command [global options] command
 ```

@oGsLP
Copy link
Contributor

oGsLP commented Aug 12, 2019

### .usage 和 .name

 这两个选项让你可以自定义在帮助信息第一行中显示的命令使用描述(description),并且描述是从(完整的)命令参数中推导出来的。例如:

 ```js
 program
     .name("my-command")
     .usage("[global options] command")
     ```

 帮助信息会以此开头:

 ```Text
 Usage: my-command [global options] command
     ```

@shadowspawn
Copy link
Collaborator Author

shadowspawn commented Aug 12, 2019

Thanks @oGsLP ! I'll add this to my Pull Request.

@shadowspawn shadowspawn self-assigned this Aug 12, 2019
@shadowspawn
Copy link
Collaborator Author

(The translation has been added to develop branch for next release.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants