Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local history with pry

I'm using the pry REPL for ruby, and its rails plugin (the gem pry-rails). Currently pry has a global history for all projects. Is it possible to configure it such that each rails project will have its own history file?

like image 244
dimid Avatar asked Aug 14 '16 19:08

dimid


1 Answers

There are instructions for this on the Pry wiki under history, here's the relevant part for what you want:

Example: Put the history file in the current directory, for a separate history per-project:

Permanently (in a .pryrc file)

Pry.config.history.file = ".pry_history"
like image 88
Paul Hoffer Avatar answered Sep 21 '22 13:09

Paul Hoffer