storage/vendor/github.com/mattn/go-shellwords
dependabot-preview[bot] 0986ab66c5 Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6
Bumps [github.com/mattn/go-shellwords](https://github.com/mattn/go-shellwords) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/mattn/go-shellwords/releases)
- [Commits](https://github.com/mattn/go-shellwords/compare/v1.0.5...v1.0.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-05 12:13:54 +01:00
..
.travis.yml Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-11-05 12:13:54 +01:00
LICENSE Switch to go modules 2019-07-09 08:32:22 +02:00
README.md Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-11-05 12:13:54 +01:00
go.mod Switch to go modules 2019-07-09 08:32:22 +02:00
go.test.sh Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-11-05 12:13:54 +01:00
shellwords.go Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-11-05 12:13:54 +01:00
util_go15.go Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-11-05 12:13:54 +01:00
util_posix.go Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-11-05 12:13:54 +01:00
util_windows.go Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-11-05 12:13:54 +01:00

README.md

go-shellwords

codecov Build Status

Parse line as shell words.

Usage

args, err := shellwords.Parse("./foo --bar=baz")
// args should be ["./foo", "--bar=baz"]
os.Setenv("FOO", "bar")
p := shellwords.NewParser()
p.ParseEnv = true
args, err := p.Parse("./foo $FOO")
// args should be ["./foo", "bar"]
p := shellwords.NewParser()
p.ParseBacktick = true
args, err := p.Parse("./foo `echo $SHELL`")
// args should be ["./foo", "/bin/bash"]
shellwords.ParseBacktick = true
p := shellwords.NewParser()
args, err := p.Parse("./foo `echo $SHELL`")
// args should be ["./foo", "/bin/bash"]

Thanks

This is based on cpan module Parse::CommandLine.

License

under the MIT License: http://mattn.mit-license.org/2017

Author

Yasuhiro Matsumoto (a.k.a mattn)