-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pry's command history malfunctions when pry-coolline's active #28
Comments
Same problem here. |
This appears to be a problem because both the coolline gem and the pry gem are writing to the same
Since both pry and coolline are writing to the history file, you appear to have to up-arrow twice to get to the last command, but it is actually first reading the entry from pry, and second reading the entry from coolline. You can confirm this with a simple monkey-patch to https://github.com/Mon-Ouie/coolline/blob/0ced8fc48dd3e62bc1b0cd8e819197424aac3b32/lib/coolline/history.rb#L64: Either way, the fix is to monkey-patch either coolline (so it doesn't try to save the history file at all) or pry-coolline (so it passes in a null file for the history, e.g., I can't see why either pry-coolline or coolline need access to the pry history to be able to serve their intended purposes here, but there may be context that I am missing that @banister can explain. |
I looked into this more last night and was wrong about it. Ultimately, since both coolline and pry are going to try to write to the history file, I resolved it by editing my |
Where using
pry
(0.10.0) withpry-coolline
(0.2.4) andcooline
(0.4.4), you need to push the up arrow button twice (instead of once) to get the last entered expression, like there was always an extra empty entry at the command history.This is happening to me using ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux].
The text was updated successfully, but these errors were encountered: