Skip to content

Commit c69d859

Browse files
committed
docs(cli): clarify shell command behavior
1 parent de4244b commit c69d859

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/commands.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ const COMMANDS = [
158158

159159
{
160160
name: "shell",
161-
summary: "run a shell command (blocking, spawnSync $SHELL -c)",
161+
summary: "run a shell command (blocking, cmd.exe on Windows or $SHELL -c elsewhere)",
162162
// The moshscript system verb for arbitrary shell commands. Blocking
163163
// (spawnSync + inherited stdio) so it runs inline in the no-`await` style,
164164
// and the child owns the terminal for interactive commands. Returns

test/commands.test.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,9 @@ test("the vocabulary exposes summaries for `moshcode commands`", () => {
8383
assert.ok(cmd.summary.length > 0, `${cmd.name}() needs a summary`);
8484
}
8585
});
86+
87+
test("shell() summary describes the portable shell behavior", () => {
88+
const cmd = moshVocabulary().get("shell");
89+
assert.match(cmd.summary, /cmd\.exe on Windows/);
90+
assert.match(cmd.summary, /\$SHELL -c elsewhere/);
91+
});

0 commit comments

Comments
 (0)