rubyunixrdocri

ri output can't be piped into less


I'm running ri version 2.5.8 and ruby 1.9.2. If I try something like ri Enumerable | less, the paging is broken in less. I see output but I can't use CTRL-F or CTRL-B to page back and forward. If I try to, I just see the literal "^F" and "^B" characters output at the bottom of the screen. What's wrong?


Solution

  • Try ri -T String | less.

    If you want that behavior always you could put alias ri='ri -T' in your ~/.bashrc or ~/.bash_profile or ~/.profile, which ever you use.