Search code examples
ruby-on-railsrubyirb

Keyboard shortcuts to navigate the command line in irb


I've seen screencasts where users are running irb and as they write text they jump to the beginning/end of the line and beginning/end of words. What are the keystrokes used to do this? Does it depend on the shell that's being used?


Solution

  • Ctrl + A => Move to beginning of line
    Ctrl + E => Move to end of line 
    

    These are readline commands

    Here is a cheatsheet you may find helpful in general