Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Readline + irb/pry = <3

Readline + irb/pry = <3

Bruno Sutic

June 30, 2015
Tweet

More Decks by Bruno Sutic

Other Decks in Programming

Transcript

  1. What is ‘readline’? • you already (most likely) use it!

    • system library for terminal applications
 (bash, irb, pry, node, sql or any other REPL) • features: • cursor manipulation • command line history and search • command completion
  2. Readline installation • OS X
 $ brew install readline •

    Ubuntu/Debian
 $ apt-get install libreadline-dev • Fedora
 $ yum install readline-devel
  3. Readline + Ruby Ruby has to be compiled with readline

    support • ruby-build
 it just works • rvm
 dunno? (don’t use rvm, use rbenv + ruby-build)
  4. Conclusion • Readline + irb/pry is great • Install readline

    + ruby (with ruby-build) = it just works • .inputrc tweak for “backward-kill-word”
 
 set editing-mode emacs
 $if mode=emacs
 C-w: backward-kill-word
 $endif