package main
import (
"fmt"
shellquote "github.com/kballard/go-shellquote"
)
func main() {
dir := "#metoo"
fmt.Print(shellquote.Join("cd", dir))
}
Behavior I get:
$ go run . | sh -x
+ cd
$ go run .
cd #metoo
Behavior expected:
$ go run . | sh -x
+ cd #metoo
$ go run .
cd \#metoo
Thank you for creating and maintaining open source software. 🥇