Skip to content

it seems weird that comments do not get escaped #15

@jabielecki

Description

@jabielecki
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. 🥇

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions