Documentation
¶
Overview ¶
Package shellwrap holds the self-path resolution and POSIX shell quoting helpers shared by every harness adapter that wraps a command through `ctxcop run -- bash -c '<quoted>'`. Extracted from internal/harness/claudecode so the aider adapter (which builds its wrap at install time instead of hook time) doesn't duplicate it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SelfPath ¶
func SelfPath() string
SelfPath returns the absolute path of the running binary, falling back to "ctxcop" on resolution failure.
func Unquote ¶
Unquote reverses Quote: given a string that Quote could have produced (either a bare unquoted word, or one or more single-quoted segments joined by the POSIX `'\”` escape), it returns the original value and true. It returns false if s is not fully consumed by a single shell word — no trailing content is tolerated, so a wrap can't be spoofed by appending unwrapped commands after a legitimate-looking quoted argument.
Types ¶
This section is empty.