Skip to content
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 doesn't autoload history #2252

Open
jforberg opened this issue Jul 19, 2022 · 1 comment
Open

Pry doesn't autoload history #2252

jforberg opened this issue Jul 19, 2022 · 1 comment

Comments

@jforberg
Copy link

Pry 0.14.1 doesn't load history from the history file as it's supposed to. It's necessary to call "Pry.history.load" manually for history to be loaded.

The issue is reproducible in a plain debian docker image.

docker run -it debian:bullseye

# From now, inside container
cd
apt update && apt install -y rubygems
gem install --user-install pry
echo "Pry.config.history_file = '.pry_history'" >.pryrc
~/.local/share/gem/ruby/2.7.0/bin/pry
# enter some commands into pry then exit

# verify that the history is being written out
cat .pry_history

# Start pry again
~/.local/share/gem/ruby/2.7.0/bin/pry
# Press Ctrl-P and notice that history is missing
# If we enter the manual command "Pry.history.load", things work again
@jaens
Copy link

jaens commented Aug 7, 2022

Can reproduce this too, history loading is completely broken, but writing is still working silently. Default Debian install with Ruby 3.

❯ pry
[1] pry(main)> Pry.config.history_save
=> true
[2] pry(main)> Pry.config.history_load
=> true

❯ tail ~/.pry_history 
Pry.config.history_save
Pry.config.history_load

❯ pry
[1] pry(main)> hist --all

[2] pry(main)> hist -a
1: hist --all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants