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

history merge in private mode clears history #9050

Closed
PatrickF1 opened this issue Jul 1, 2022 · 4 comments
Closed

history merge in private mode clears history #9050

PatrickF1 opened this issue Jul 1, 2022 · 4 comments
Labels
bug Something that's not working as intended
Milestone

Comments

@PatrickF1
Copy link

echo $version
3.5.0

Yes, I tested this without third-party customizations.

How to repro

  1. Spawn a new fish session in private mode: sh -c 'env HOME=$(mktemp -d) fish --private'
  2. Run a few commands; doesn't matter what you type because even invalid commands make it into history
  3. Check history using history
  4. history merge
  5. Check history again and notice it is now blank

Is this a bug or intended?

@faho faho closed this as completed in bd7934c Jul 1, 2022
@faho faho added the bug Something that's not working as intended label Jul 1, 2022
@faho faho added this to the fish 3.6.0 milestone Jul 1, 2022
@faho
Copy link
Member

faho commented Jul 1, 2022

Yeah, sure, I just made it error out - merging history in private mode is by definition wrong.

@PatrickF1
Copy link
Author

Thanks! But where does it say that it's by definition wrong? It seems to me it should actually just proceed with incorporating history into the current session.

@faho
Copy link
Member

faho commented Jul 1, 2022

Merging goes both ways. And I really really really don't want to add a secondary path that barely anybody uses that needs us to only do half of that.

@PatrickF1
Copy link
Author

I didn't know merging goes both ways. Yeah I agree erroring is the right choice here, thanks!

zanchey pushed a commit that referenced this issue Jul 13, 2022
It makes *no* sense.

Fixes #9050.

(cherry picked from commit bd7934c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants