pixelb / crudini

A utility for manipulating ini files
GNU General Public License v2.0
442 stars 63 forks source link

Remove quotes for shell scripts #79

Open Hayao0819 opened 3 years ago

Hayao0819 commented 3 years ago

I'm very excited to find a great tool that I can use in this shell script right now.

When I use this tool in a shell script to reference a value, I have to use sed to manually remove the quotes. I want an option to remove quotes, like the -r option of the jq command.

pixelb commented 3 years ago

quotes are unusual in ini values, since they're redundant. You might use the shell to parse with something like:

eval variable=$(crudini --get file.ini section parameter)

Now $variable will have the unquoted value.

Perhaps we can add an option. Perhaps like jq -r, we could assume the values were json, and use that to unquote