What alternatives to IRB are there?

前端 未结 9 1124
一生所求
一生所求 2021-01-31 03:17

In the python world, there are a number of alternative python interpreters that add cool additional features. One particularly useful example is bpython, which adds dynamic synt

9条回答
  •  轮回少年
    2021-01-31 03:38

    I've never heard of a (popular) alternative to IRB, but there certainly are several useful gems that make the IRB experience a lot nicer:

    • awesome_print pretty prints Ruby objects with indentation and coloring, very useful when trying to look at nested hashes or other complicated data structures.
    • looksee is pretty awesome too, it provides a method lp (lookup path) that shows you where a Ruby object gets its methods from (class, superclass etc).
    • Sketches connects your editor and IRB, so it's especially useful if you are the type who likes interactive development. Emacs with inf-ruby is also good for this.
    • Wirble is a whole set of IRB enhancements, like tab completion and syntax highlighting. There's also Utility Belt, but I don't personally use that, so can't comment on its features.

    Edit

    I forgot Hirb, which is very useful for e.g. showing the results of an ActiveRecord query in a Rails console.

提交回复
热议问题