Question

What is the right combination for exit RI on Ubuntu(13.04)?

For example, the following line:

ri GC::enable

gives me:

enter image description here

pressing the following commands do nothing: PAUSE/BREAK, Home, End, Ctrl+Shift+D

The only thing that exist is ctrl+c but it throws errors like this:

from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/gems/rdoc-4.0.1/lib/rdoc/ri/driver.rb:774:in display_class' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/gems/rdoc-4.0.1/lib/rdoc/ri/driver.rb:800:in display_name' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/gems/rdoc-4.0.1/lib/rdoc/ri/driver.rb:827:in block in display_names' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/gems/rdoc-4.0.1/lib/rdoc/ri/driver.rb:824:in each' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/gems/rdoc-4.0.1/lib/rdoc/ri/driver.rb:824:in display_names' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/gems/rdoc-4.0.1/lib/rdoc/ri/driver.rb:1361:in run' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/gems/rdoc-4.0.1/lib/rdoc/ri/driver.rb:356:in run' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/gems/rdoc-4.0.1/bin/ri:12:in ' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/bin/ri:23:in load' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/bin/ri:23:in' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in eval' from /home/gotqn/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in '

and something more, even it seems the RI has been stopped, but pressing any of the keys gives me again this:

enter image description here

Was it helpful?

Solution

Press q.

ri pipes the output through what's called a pager. The pager on most systems is a program that is named either more or less. See the manpages for those commands for more information (man more or man less).

You can set your pager through the environment variable PAGER in the shell. For example on my machine in bash:

> echo $PAGER
/usr/bin/less

OTHER TIPS

Just press q.

It's the same as exiting man pages.

▶ ri -i

Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.

>> 

Like it says.

You can also use ctrld to indicate end of input from your keyboard device if you used ri -i for interactive mode.

Now if it opened up your pager, then q may work (if it is less, for example) otherwise see the manual for your pager.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top