-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
CTRL+R (reverse search) results are reset after shell is closed #1002
Comments
If memory serves me right, we've had someone stumble upon this before. |
You have a good memory... I completely forgot about that one |
Yes, it turns out that in order to make ZSH history work you have to configure it yourself. It seems to be auto-configured for history when using oh-my-zsh or if you set up ZSH initially with option (1). Thanks for linking that issue, that really helps. Led me to this which solved it: https://unix.stackexchange.com/questions/389881/history-isnt-preserved-in-zsh Added these lines to .zshrc:
Apologies for not knowing enough about zsh to have to open this issue, lol. Hopefully this helps someone out in the future. |
I'll create a FAQ item about this. As we want to be careful overriding people's settings, I don't want to add this to our init script, but it's really useful to know if you encounter this. |
I found the links to solve the issue months ago and still I forgot about it, so don’t be sorry :) |
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. |
Code of Conduct
What happened?
After closing a shell (ZSH) on Linux (both WSL and SSH), the CTRL+R results do not show up after logging back into the Linux system (also affects searching with up + down arrow keys). In regular bash, zsh, and oh-my-zsh, after logging off and logging back on, command history is preserved.
The ctrl+r functionality works perfectly fine on Windows after closing/reopening Powershell on Windows.
Version
5.6.0. Have tested both the winget Windows version (includes oh-my-posh-wsl), as well as a native Linux install on one of my machines. Both have the same problem.
Theme
blue-owl, lightly customized. https://gist.github.com/therealpaulgg/9aabf3235278a3227b6daff1fcc52837
What OS are you seeing the problem on?
Windows, Linux
Which shell are you using?
zsh, powershell
Relevant log output
No response
The text was updated successfully, but these errors were encountered: