Skip to content

@nogoo9/mcp-server-cloud-fs / tools/shell/parser / parseCommandList

Function: parseCommandList()

parseCommandList(command): CommandList

Defined in: tools/shell/parser.ts:192

Parse a raw command string that may contain &&, ||, or ; operators into a CommandList. Each entry holds one pipeline and the operator that follows it (null for the last entry).

Quoting is fully respected: echo "a&&b" produces a single-entry list.

Parameters

command

string

Returns

CommandList

Example

ts
parseCommandList("echo a && echo b");
// → [{ pipeline: …echo a…, operator: "&&" }, { pipeline: …echo b…, operator: null }]

Released under the PolyForm Shield 1.0.0 License.