Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Wing924/shellwords
A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell.
https://github.com/Wing924/shellwords
go golang golang-library
Last synced: about 1 month ago
JSON representation
A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell.
- Host: GitHub
- URL: https://github.com/Wing924/shellwords
- Owner: Wing924
- License: apache-2.0
- Created: 2017-09-28T09:08:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-20T06:25:14.000Z (about 1 year ago)
- Last Synced: 2024-01-28T08:38:33.532Z (4 months ago)
- Topics: go, golang, golang-library
- Language: Go
- Size: 11.7 KB
- Stars: 21
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Lists
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go-extra - shellwords - 09-28T09:08:28Z|2022-03-15T08:24:38Z| (Microsoft Office / Uncategorized)
- awesome-go-zh - shellwords
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go - shellwords - | - | - | (Miscellaneous / Strings)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go-projects - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Advanced Console UIs)
- awesome-go-with-framework - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Strings)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go-cn - shellwords
- zero-alloc-awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Strings)
- awesome-go. - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Advanced Console UIs)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (<span id="其他-miscellaneous">其他 Miscellaneous</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go-with-stars - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- repo-1316-awesome-go-cn - shellwords
- repo-1211-awesome-go-cn - shellwords
- awesome-Char - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-reader - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Strings)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Strings)
- Go-awesome - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- go-awesome-cn-star - shellwords
- awesome-go-cn - shellwords
- awesome-go-handwritten - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Advanced Console UIs)
- awesome-go2 - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Advanced Console UIs)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. - :arrow_down:0 - :star:1 (Miscellaneous / Strings)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go-stars - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go-cn - shellwords
- awesome-go-zh - shellwords
- awesome-go-cn - shellwords
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. (Miscellaneous / Uncategorized)
- awesome-go-cn - shellwords
- awesome-go - shellwords - A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. - ★ 3 (Miscellaneous)
README
# shellwords
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Go Report Card](https://goreportcard.com/badge/github.com/Wing924/shellwords)](https://goreportcard.com/report/github.com/Wing924/shellwords)
[![codecov](https://codecov.io/gh/Wing924/shellwords/branch/master/graph/badge.svg)](https://codecov.io/gh/Wing924/shellwords)
[![GoDoc](https://godoc.org/github.com/Wing924/shellwords?status.svg)](https://godoc.org/github.com/Wing924/shellwords)A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell.
## Installation
```sh
go get github.com/Wing924/shellwords
```## Usage
```go
import "github.com/Wing924/shellwords"
``````go
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"]
``````go
line := shellwords.Join([]string{"abc", "d e f"})
// line should be `abc d\ e\ f`
``````go
line := shellwords.Escape("./foo 'a b c'")
// line should be `./foo\ \'a\ b\ c\'\"`
```## Thanks
This is based on ruby module: [Shellwords](https://github.com/ruby/shellwords)