Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Rakefile
Octocat-spinner-32 pry-buffers.gemspec


Use buffers to edit and execute arbitrary code inside of pry. You can think of this plugin as a vitamined version of the "edit -t" command where the edited files are stored and can be reused.


gem install pry-buffers


WARNING: pry-buffers needs a HOME environment variable to be defined in order to work properly.

pry(main)> buf -h
Usage: buf [-l|-s|-d|-h] <BUFFER>
Open a text editor and evaluate its content upon close. When no buffer
is given, the "default" buffer is used by default. You can also show or
delete the contents of a given buffer or list all the stored buffers.
e.g: buf
     buf test
     buf -d test
     buf -s test
     buf -l
     buf -h


    -s, --show        show the contents of the buffer
    -d, --delete      clears the given buffer
    -l, --list        List all the stored buffers
    -h, --help        This message

pry(main)> buf

pry(main)> buf -l
Available buffers: default

pry(main)> buf test
This is a test

pry(main)> buf -s test
Buffer test contents:
puts "This is a test"

pry(main)> buf -l
Available buffers: default, test

pry(main)> buf -d test
Buffer test cleaned


pry-buffers been developed and tested against Ruby 1.9.2 and Pry


Please use GitHub ( to report bugs, make suggestions or send patches.

Something went wrong with that request. Please try again.