gron icon indicating copy to clipboard operation
gron copied to clipboard

Feature Request: Support for Ruby syntax

Open forthrin opened this issue 11 months ago • 4 comments

$ gron
foo.bar.baz = true;
$ gron -r
foo['bar']['baz'] = true

forthrin avatar Mar 16 '24 12:03 forthrin

Try changing the first line to Hashie::Mash.new from the Hashie gem and the rest should work fine.

saraid avatar Jul 12 '24 17:07 saraid

You're suggesting some Ruby statement from gem, whereas gron is a shell utility.

forthrin avatar Jul 12 '24 17:07 forthrin

I'm presuming you have a use case that involves executing the generated Ruby code in Ruby. If you don't have any use case for this, please ignore my suggestion.

saraid avatar Jul 12 '24 18:07 saraid

Ah! The gem generates Ruby statements that builds the hash. Nice tip. Hope for CLI support too.

forthrin avatar Jul 12 '24 18:07 forthrin