awesome-print / awesome_print

Pretty print your Ruby objects with style -- in full color and with proper indentation
http://github.com/michaeldv/awesome_print
MIT License
4.07k stars 454 forks source link

[Feature Request] Add options to Awesome.pry!/irb! to allow set global config. #353

Open zw963 opened 5 years ago

zw963 commented 5 years ago

image

Thanks

Aeyk commented 5 years ago

This is done with the index: false argument like so:

irb(main):023:0> ap [1,2,3,4], index: false
  [
      1,
      2,
      3,
      4
  ]
  => nil
zw963 commented 5 years ago

@Aeyk , Cool, i thought i read all document before create this issue, but, nowhere told me this usage?

zw963 commented 5 years ago

Is there an global config for this?

in most case, i am not use ap directly, it just combind with pry, auto print returned _ value.

zw963 commented 5 years ago

I do a quick hack for support config when setting Awesome.pry!(index: false)

image

If maintainer consider add this feature, i will add to Awesome.irb! too.

Thanks.

guillaumebriday commented 5 years ago

Would you consider to open a PR with this changes ?

And the same with irb!.

that's could be awesome !

Thank you