MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / formatCommand

Function formatCommand

frontend/src/utils/shell-tokenize.ts:47–55  ·  view source on GitHub ↗
(command: string[])

Source from the content-addressed store, hash-verified

45 * a double quote) so `tokenizeCommand` parses them back to the same list.
46 */
47export function formatCommand(command: string[]): string {
48 return command
49 .map((part) => {
50 if (part === "") return '""';
51 if (!/\s/.test(part)) return part;
52 return part.includes('"') ? `'${part}'` : `"${part}"`;
53 })
54 .join(" ");
55}

Callers 2

AgentSettingsScreenFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected