1 This is a modified version of `go-shellwords` for the micro editor.
5 [![Coverage Status](https://coveralls.io/repos/mattn/go-shellwords/badge.png?branch=master)](https://coveralls.io/r/mattn/go-shellwords?branch=master)
6 [![Build Status](https://travis-ci.org/mattn/go-shellwords.svg?branch=master)](https://travis-ci.org/mattn/go-shellwords)
8 Parse line as shell words.
13 args, err := shellwords.Parse("./foo --bar=baz")
14 // args should be ["./foo", "--bar=baz"]
18 os.Setenv("FOO", "bar")
19 p := shellwords.NewParser()
21 args, err := p.Parse("./foo $FOO")
22 // args should be ["./foo", "bar"]
26 p := shellwords.NewParser()
27 p.ParseBacktick = true
28 args, err := p.Parse("./foo `echo $SHELL`")
29 // args should be ["./foo", "/bin/bash"]
33 shellwords.ParseBacktick = true
34 p := shellwords.NewParser()
35 args, err := p.Parse("./foo `echo $SHELL`")
36 // args should be ["./foo", "/bin/bash"]
41 This is based on cpan module [Parse::CommandLine](https://metacpan.org/pod/Parse::CommandLine).
45 under the MIT License: http://mattn.mit-license.org/2017
49 Yasuhiro Matsumoto (a.k.a mattn)