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

Function unquote

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

Source from the content-addressed store, hash-verified

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>()
83 for (const token of shellTokens(command)) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected