Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.11 KB

File metadata and controls

51 lines (32 loc) · 1.11 KB

Yaml-Parse

Build Status

Yaml-Parse is an Ash module that offers YAML parsing in Bash.

Getting started

Yaml-Parse is part of the Ash core, so you can just start using it in your Ash modules.

Example Usage

Our YAML file:

name: "Brandon Romano"
location: "Brooklyn, NYC"

Here's some example usage:

eval $(YamlParse__parse "./path/to/file.yaml" "Config_")
echo "$Config_name"
echo "$Config_location"

Outputs:

Brandon Romano
Brooklyn, NYC

Running Tests

Tests are written using the official test module

You can run tests by running this command, after Yaml-Parse is installed:

ash test yamlparse

Credits

All of the heavy lifting was done by Stefan Farestam in response to this StackOverflow Post. This is simply an Ash wrapper.

License

MIT