Documentation
¶
Overview ¶
Package shellquote provides shell argument quoting and prompt-file helpers.
Use Quote and SubstitutePrompt when building shell command templates, and WritePrompt to materialize prompt content under a run directory.
Example:
path, err := shellquote.WritePrompt(runDir, prompt)
cmd := shellquote.SubstitutePrompt("cat {prompt}", path)
Index ¶
Constants ¶
View Source
const ( // DefaultPromptFile is the default prompt filename under a run directory. DefaultPromptFile = "prompt.md" // PromptPlaceholder is substituted with a quoted prompt path in templates. PromptPlaceholder = "{prompt}" )
Variables ¶
This section is empty.
Functions ¶
func PromptPath ¶
PromptPath returns the default prompt file path under runDir.
func SubstitutePrompt ¶
SubstitutePrompt replaces PromptPlaceholder with a quoted promptPath in template.
func WritePrompt ¶
WritePrompt writes content to the default prompt file under runDir.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.