From abfebea5fe34ebc1ffa850862b4f04ce9218963b Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Mon, 22 Jul 2024 15:43:53 -0400 Subject: [PATCH] improved usage docs and removed extra cmd in shell choices --- cli/default.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cli/default.js b/cli/default.js index a695a5c..b5402ee 100644 --- a/cli/default.js +++ b/cli/default.js @@ -6,7 +6,17 @@ const shell = require('../lib/shell.js'); class LeiaCommand extends Command { static id = 'leia'; static description = 'Cleverly converts markdown files into mocha cli tests'; - static usage = ' [options]'; + static usage = ` \ +[--cleanup-header=] \ +[--debug] \ +[--help] \ +[--ignore=] \ +[--retry=] \ +[--setup-header=] \ +[--test-header=] \ +[--shell=] \ +[--stdin] \ +[--version]`; static strict = false; static examples = [ 'leia README.md', @@ -59,7 +69,7 @@ class LeiaCommand extends Command { 'shell': flags.string({ default: shell().binary, description: 'the shell to use for the tests, default is autodetected', - options: ['bash', 'cmd', 'powershell', 'pwsh', 'sh', 'zsh', 'cmd'], + options: ['bash', 'cmd', 'powershell', 'pwsh', 'sh', 'zsh'], }), 'stdin': flags.boolean({ description: 'attach stdin when the test is run', @@ -108,6 +118,7 @@ class LeiaCommand extends Command { .fromPairs() .value(); + // make sure we split any headers that need to be split ['setupHeader', 'testHeader', 'cleanupHeader'].forEach((header) => { if (options[header].length === 1) options[header] = options[header][0].split(',');