Skip to content

Commit 9bebda6

Browse files
committed
add help of templates command
1 parent 2d590fd commit 9bebda6

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/cli/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ commander
1818
.option("--template <name>", "specify the provisioning template")
1919
.option("--no-template", "do not use templates, even if specified by global config")
2020
.description("create new contest project directory")
21-
.on("--help", function () {
21+
.on("--help", () => {
2222
console.log("");
2323
console.log(help.task_choices);
2424
});
@@ -34,7 +34,7 @@ commander
3434
.option("--template <name>", "specify the provisioning template")
3535
.option("--no-template", "do not use templates, even if specified by global config")
3636
.description("add new directory for the task in the project directory")
37-
.on("--help", function () {
37+
.on("--help", () => {
3838
console.log("");
3939
console.log(help.task_choices);
4040
});
@@ -90,7 +90,7 @@ commander
9090
.command("format <format> <contest-id> [task-id]")
9191
.action(commands.format)
9292
.description("format string with contest and/or task information.")
93-
.on("--help", function () {
93+
.on("--help", () => {
9494
console.log("");
9595
console.log(help.format_strings);
9696
});
@@ -114,6 +114,10 @@ commander
114114
commander
115115
.command("templates")
116116
.action(commands.getTemplateList)
117-
.description("show user templates in the config directory");
117+
.description("show user templates in the config directory")
118+
.on("--help", () => {
119+
console.log("");
120+
console.log(help.provisioning_templates);
121+
});
118122

119123
commander.parse(process.argv);

src/help.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ export const format_strings = `Supported format strings:
2020
{ContestID} contest id (shown as contest URL path, e.g. arc100)
2121
{CONTESTID} contest id, upper case
2222
{TailNumberOfContestID} if contest id is arc100, 100 is the tail number. (this format string may be empty, some contests such as abs)
23-
{ContestTitle} contest title
24-
`;
23+
{ContestTitle} contest title`;
24+
25+
export const provisioning_templates = `See also:
26+
https://github.com/Tatamo/atcoder-cli#provisioning-templates`;

0 commit comments

Comments
 (0)