Slide 1

Slide 1 text

Readline + irb/pry = ♥

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Readline demo in bash

Slide 5

Slide 5 text

Readline installation • OS X
 $ brew install readline • Ubuntu/Debian
 $ apt-get install libreadline-dev • Fedora
 $ yum install readline-devel

Slide 6

Slide 6 text

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)

Slide 7

Slide 7 text

Readline + irb demo and a small hack

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

visit Terminal Zagreb meetup group For more productivity tips & tricks

Slide 10

Slide 10 text

Questions?