-
Notifications
You must be signed in to change notification settings - Fork 87
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
[Search history] don't merge history when in private mode #245
Conversation
Are you saying it clears the session history of the current session but leaves the other sessions' history intact, or it clears every session's history? |
Just the current session (if it ever does the latter, I would be crying). |
This seems like a bug that should be fixed in fish. Why would they cause it to clear history? |
But we can fix it now, instead of waiting for identifying if this is really an issue and fish release a new version with fix. |
Sure! In the meantime, I've filed a bug report fish-shell/fish-shell#9050 |
Oh wow bug already got fixed in fish-shell master. Looks like the fix is to make it error out so regardless, it was good that we merged this. |
@@ -1,6 +1,9 @@ | |||
function _fzf_search_history --description "Search command history. Replace the command line with the selected command." | |||
# history merge incorporates history changes from other fish sessions | |||
builtin history merge | |||
# skip merging in private mode as it clears current session history | |||
if test -n "$fish_provate_mode" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops just realized there's a typo here. I'll fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time to get a spell checker for vim I guess 😅
Fix wrong test operator and typo in variable name. Follow up to #245.
Calling
history merge
in private mode (fish --private
) clears the session history. So if you execute the search history function while in private mode, there is no history to search.