MCPcopy Create free account
hub / github.com/anomalyco/opencode / shellTokens

Function shellTokens

packages/core/src/tool/bash.ts:79–79  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

77// TODO: Stream full shell output into managed storage while retaining only a bounded in-memory preview.
78
79const shellTokens = (command: string) => command.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g) ?? []
80const unquote = (value: string) => value.replace(/^(['"])(.*)\1$/, "$2")
81const externalCommandDirectories = (command: string, cwd: string) => {
82 const directories = new Set<string>()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected