shellwords

Version, currently 0.1.01 version
  • 0.1.0latestFeb 5, 2021

github.com/szTheory/shellwords-crystal

Manipulates strings with word parsing rules of UNIX Bourne shell.

2 stars
1 dependent
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  shellwords:
    github: szTheory/shellwords-crystal
    version: ~> 0.1.0

Then run:

shards install

shard.yml

Crystal
0.36.1
License
MIT
Author
szTheory

Dependencies

Development Dependencies

  • ameba~> 0.13.3github: crystal-ameba/amebadev

README

Shellwords

Build Status Docs GitHub release GitHub stars

This module manipulates strings according to the word parsing rules of the UNIX Bourne shell. Fork of the Ruby shellwords gem.

The shellwords() function was originally a port of shellwords.pl, but modified to conform to the Shell & Utilities volume of the IEEE Std 1003.1-2008, 2016 Edition [1].

[1] IEEE Std 1003.1-2008, 2016 Edition, the Shell & Utilities volume

Installation

  1. Add the dependency to your shard.yml:
dependencies:
  shellwords:
    github: szTheory/shellwords-crystal
  1. Run shards install

Usage

require 'shellwords'

argv = Shellwords.shellsplit('three blind "mice"')
argv #=> ["three", "blind", "mice"]

Development

After checking out the repo, install the shard dependencies. Then, run crystal spec to run the specs. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/szTheory/shellwords-crystal