Skip to content

brandonkramer/shellquote

Repository files navigation

shellquote

Shell argument quoting and prompt-file helpers for command templates.

Install

From pkg.go.dev:

go get github.com/brandonkramer/shellquote@v0.1.0

Usage

path, err := shellquote.WritePrompt(runDir, promptContent)
cmd := shellquote.SubstitutePrompt("cat {prompt}", path)
quoted := shellquote.Quote("/tmp/a file")

Constants:

  • shellquote.DefaultPromptFile"prompt.md"
  • shellquote.PromptPlaceholder"{prompt}"

Development

Lefthook and golangci-lint are pinned in go.mod as tools (dev-only). Install git hooks once per clone:

make install-hooks
make check
make test
make lint

About

Shell argument quoting and prompt-file helpers for Go command templates. Stdlib-only.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors