Last active
June 6, 2026 07:12
-
-
Save ybiquitous/ffd3fc35a3afe5a70558547c1284ad18 to your computer and use it in GitHub Desktop.
How to make `ri` more rich via `bat` in Markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export RI='--format=markdown' | |
| export RI_PAGER='bat --language=markdown' | |
| ri |
Author
Author
References
- https://github.com/ruby/rdoc --
riis a part of RDoc - https://github.com/sharkdp/bat -- A cat(1) clone
Author
This technique is also applied to show_doc in irb.
E.g.,
$ irb
irb(main):001> show_doc Object
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Example -
ri Object