All Projects → mattn → Go Shellwords

mattn / Go Shellwords

Licence: mit
Parse line as shell words

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Go Shellwords

Algebraicengine Fraction
a calculating engine~
Stars: ✭ 311 (-12.39%)
Mutual labels:  parser
Craftinginterpreters
Repository for the book "Crafting Interpreters"
Stars: ✭ 4,298 (+1110.7%)
Mutual labels:  parser
Morphism
⚡ Type-safe data transformer for JavaScript, TypeScript & Node.js.
Stars: ✭ 336 (-5.35%)
Mutual labels:  parser
Typed Query Selector
Better typed `querySelector` and `querySelectorAll`.
Stars: ✭ 316 (-10.99%)
Mutual labels:  parser
Intellij Plugin V4
An IntelliJ plugin for ANTLR v4
Stars: ✭ 318 (-10.42%)
Mutual labels:  parser
Ics Py
Pythonic and easy iCalendar library (rfc5545)
Stars: ✭ 322 (-9.3%)
Mutual labels:  parser
Demoinfo
A library to analyze CS:GO demos in C#
Stars: ✭ 306 (-13.8%)
Mutual labels:  parser
Bad json parsers
Exposing problems in json parsers of several programming languages.
Stars: ✭ 351 (-1.13%)
Mutual labels:  parser
Swagger Cli
Swagger 2.0 and OpenAPI 3.0 command-line tool
Stars: ✭ 321 (-9.58%)
Mutual labels:  parser
Shortcode
Advanced shortcode (BBCode) parser and engine for PHP
Stars: ✭ 331 (-6.76%)
Mutual labels:  parser
Arcsecond
✨Zero Dependency Parser Combinator Library for JS Based on Haskell's Parsec
Stars: ✭ 317 (-10.7%)
Mutual labels:  parser
Syntax Parser
Light and fast 🚀parser! With zero dependents. - Sql Parser Demo added!
Stars: ✭ 317 (-10.7%)
Mutual labels:  parser
Zh Address Parse
全网识别准确度最高的中国大陆收货地址智能解析
Stars: ✭ 328 (-7.61%)
Mutual labels:  parser
Astroid
A common base representation of python source code for pylint and other projects
Stars: ✭ 310 (-12.68%)
Mutual labels:  parser
Hlsltools
A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
Stars: ✭ 336 (-5.35%)
Mutual labels:  parser
Regex
The Hoa\Regex library.
Stars: ✭ 308 (-13.24%)
Mutual labels:  parser
Md4c
C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
Stars: ✭ 322 (-9.3%)
Mutual labels:  parser
Pyhocon
HOCON parser for Python
Stars: ✭ 355 (+0%)
Mutual labels:  parser
Js Quantities
JavaScript library for quantity calculation and unit conversion
Stars: ✭ 335 (-5.63%)
Mutual labels:  parser
Tsdoc
A doc comment standard for TypeScript
Stars: ✭ 3,785 (+966.2%)
Mutual labels:  parser

go-shellwords

codecov Build Status PkgGoDev ci

Parse line as shell words.

Usage

args, err := shellwords.Parse("./foo --bar=baz")
// args should be ["./foo", "--bar=baz"]
envs, args, err := shellwords.ParseWithEnvs("FOO=foo BAR=baz ./foo --bar=baz")
// envs should be ["FOO=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)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].