Skip to content
Myr

Add Chinese translation for .name and .usage section

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by John Gee · committed by John Gee · parent b19b58e · Browse files · 1 file+4 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−5 removed

  • other:+4 added−5 removed

1 file+4 added−5 removed

modified:Readme_zh-CN.md+4 added-5 removed
20 unmodified lines
21 - [操作处理程序(Action handler) (子)命令](#%e6%93%8d%e4%bd%9c%e5%a4%84%e7%90%86%e7%a8%8b%e5%ba%8faction-handler-%e5%ad%90%e5%91%bd%e4%bb%a4)22 - [Git 风格的子命令](#git-%e9%a3%8e%e6%a0%bc%e7%9a%84%e5%ad%90%e5%91%bd%e4%bb%a4)23 - [自动化帮助信息 --help](#%e8%87%aa%e5%8a%a8%e5%8c%96%e5%b8%ae%e5%8a%a9%e4%bf%a1%e6%81%af---help)24 - [自定义帮助](#%e8%87%aa%e5%ae%9a%e4%b9%89%e5%b8%ae%e5%8a%a9)25 - [.usage and .name](#usage-and-name)25 - [.usage 和 .name](#usage-%e5%92%8c-name)26 - [.outputHelp(cb)](#outputhelpcb)27 - [.helpOption(flags, description)](#helpoptionflags-description)28 - [.help(cb)](#helpcb)29 - [自定义事件监听](#%e8%87%aa%e5%ae%9a%e4%b9%89%e4%ba%8b%e4%bb%b6%e7%9b%91%e5%90%ac)
414 unmodified lines
444 $ custom-help --help445 $ custom-help -h446```447448### .usage and .name448### .usage 和 .name449450These allow you to customise the usage description in the first line of the help. The name is otherwise451deduced from the (full) program arguments. Given:450这两个选项让你可以自定义在帮助信息第一行中显示的命令使用描述(description),并且描述是从(完整的)命令参数中推导出来的。例如:451452```js453program454 .name("my-command")455 .usage("[global options] command")456```457459The help will start with:458帮助信息会以此开头:459460```Text461Usage: my-command [global options] command462```
141 unmodified lines