buildah/vendor/github.com/mattn/go-shellwords
dependabot-preview[bot] 00a6951c61 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-09-30 15:50:37 +02:00
..
.travis.yml Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-09-30 15:50:37 +02:00
LICENSE Bump github.com/mattn/go-shellwords 2017-04-27 18:21:13 +00:00
README.md Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-09-30 15:50:37 +02:00
go.mod vendor github.com/containers/storage@v1.12.15 2019-07-26 13:31:14 +00:00
go.test.sh Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-09-30 15:50:37 +02:00
shellwords.go Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-09-30 15:50:37 +02:00
util_go15.go Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-09-30 15:50:37 +02:00
util_posix.go Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-09-30 15:50:37 +02:00
util_windows.go Bump github.com/mattn/go-shellwords from 1.0.5 to 1.0.6 2019-09-30 15:50:37 +02: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)