MCPcopy Create free account
hub / github.com/pbakaus/impeccable / shellPythonWriteContent

Function shellPythonWriteContent

skill/scripts/hook-before-edit.mjs:278–282  ·  view source on GitHub ↗
(command)

Source from the content-addressed store, hash-verified

276}
277
278function shellPythonWriteContent(command) {
279 if (!/\bpython(?:3)?\b/.test(command || '')) return '';
280 const script = shellHereDocContent(command) || command;
281 return pythonStringArg(script, /\.write_text\s*\(\s*/g) || pythonStringArg(script, /\.write\s*\(\s*/g);
282}
283
284function pythonStringArg(script, prefixRe) {
285 let prefix;

Callers 1

proposedContentFunction · 0.70

Calls 2

shellHereDocContentFunction · 0.70
pythonStringArgFunction · 0.70

Tested by

no test coverage detected