openuado / niet

Parse/Read yaml or json files directly in your shell (sh, bash, ksh, ...)
https://pypi.org/project/niet/
MIT License
39 stars 7 forks source link

Allow to use silent mode and doesn't display element not found #31

Closed 4383 closed 6 years ago

4383 commented 6 years ago

When an element was not found by default niet return the status code 1 and display a specific message like: Element not found <element>

I introduce the possibility to doesn't display this message by passing the --silent parameter flag, example:

$ echo '{"foo": "bar", "fizz": {"buzz": ["1", "2", "3"]}}' | niet fizz.fail --silent
$ echo $?
1

This pull request fix #30