gnprice / toml-cli

MIT License
120 stars 24 forks source link

Add --raw / -r option in `toml get` #19

Closed gnprice closed 1 year ago

gnprice commented 1 year ago

The interface I'd like here is inspired by jq -r, which I frequently find handy:

   •   --raw-output / -r:

       With this option, if the filter´s result is a string then it will be  writ‐
       ten  directly  to  standard  output  rather  than being formatted as a JSON
       string with quotes. This can be  useful  for  making  jq  filters  talk  to
       non-JSON-based systems.

Requested by @kurtbuilds in #8. There's also a TODO in the code:

// TODO: support shell-friendly output like `jq -r`
gnprice commented 1 year ago

Released this feature in v0.2.2! Thanks again @kurtbuilds for the request.