Popularity
1.8
Growing
Activity
1.7
-
22
2
3

Programming language: Go
License: Apache License 2.0
Tags: Miscellaneous    
Latest version: v1.0.0

shellwords alternatives and similar packages

Based on the "Miscellaneous" category.
Alternatively, view shellwords alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of shellwords or a related project?

Add another 'Miscellaneous' Package

README

shellwords

License Build Status Go Report Card codecov GoDoc

A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell.

Installation

go get github.com/Wing924/shellwords

Usage

import "github.com/Wing924/shellwords"
args, err := shellwords.Split("./foo --bar=baz")
// args should be ["./foo", "--bar=baz"]

args, err := shellwords.Split("./foo 'a b c'")
// args should be ["./foo", "a b c"]
line := shellwords.Join([]string{"abc", "d e f"})
// line should be `abc d\ e\ f`
line := shellwords.Escape("./foo 'a b c'")
// line should be `./foo\ \'a\ b\ c\'\"`

Thanks

This is based on go-shellwords and ruby module: rubysl-shellwords


*Note that all licence references and agreements mentioned in the shellwords README section above are relevant to that project's source code only.