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

Readline + irb/pry = <3

Readline + irb/pry = <3

Ee1bd63b4d7f6e79bdcddf1611ccec99?s=128

Bruno Sutic

June 30, 2015
Tweet

Transcript

  1. Readline + irb/pry = ♥

  2. About: Bruno Sutic, github.com/bruno-/
 Rails & Javascript developer

  3. 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
  4. Readline demo in bash

  5. Readline installation • OS X
 $ brew install readline •

    Ubuntu/Debian
 $ apt-get install libreadline-dev • Fedora
 $ yum install readline-devel
  6. 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)
  7. Readline + irb demo and a small hack

  8. 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
  9. visit Terminal Zagreb meetup group For more productivity tips &

    tricks
  10. Questions?