4. Some Pry commands
To get a list of all commands:
Pry(main)> help
show-doc space to escape command:
show-method pry(main)> cat = "fido"
history
<your commands here>
play -f <file>
edit <file>
edit [input buffer]
ri Array#each
5. Pry interactions
●;
●!
● edit
● <space>
● _ <underscore>
● history
● history --replay 101..105
6. shell commands
Pry assumes commands prefixed with a dot are shell commands
pry(main)> .ls -l
pry(main)> .svn update
pry(main)> .cat #{temp_file}
pry(main)> shell-mode #limited completion
7. Object exploration
pry(main)> pry-version
Pry version 0.9.7.4 on Ruby 1.8.7
pry(main)> cd Pry
pry(Pry)> ls
pry(Pry)> cd @history
pry(Pry)> ls -m
pry(Pry)> show-doc save
pry(Pry)> show-method save
pry(Pry)> filename = 'history'
pry(Pry)> save filename
pry(Pry)> .cat #{filename}
pry(Pry)> cd @history
pry(Pry::History)> p size
pry(Pry::History)> puts size
pry(Pry::History)> nesting
pry(Pry::History)> cd ../..
pry(main)
12. Room for improvement
Pry 0.9.8.1
● no completion everywhere
no file/path completion on shell commands
shell-mode
● how to retrieve the output of a shell command
● object exploration does not support
pwd # use nesting
cd -
● cd .. issued from top level context exits # fixed in 0.9.8.1
● issue with rspec - binding.pry => NULL pointer given