-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Merging history does not work #3496
Comments
This works for me, with and without tmux. Is tmux actually important here? If you use two yakuake tabs instead, does it work? Just to confirm, you did execute |
I've looked through your config files and cannot find anything related to this (though I don't know your plugins). I could critique them if you want me to, though. Can you try without configuration? |
Works for me as well, after doing |
It's expected that the command you ran in session fish-1 isn't in the history of session fish-2 until you run P.S., With the soon to be available 2.4.0 release this becomes |
Oh, also you might not know that if a history element is taken as a suggestion, it won't be visible when searching the history - see #405. So if you get |
@faho same behavior when
|
Maybe I got a permissions issue, where is the fish history file ? |
Again, is tmux actually relevant here? Can you reproduce this without tmux, just with multiple terminals or tabs in yakuake/konsole? And can you confirm that you also do not see
~/.local/share/fish/fish_history (or $XDG_DATA_HOME/fish/fish_history, if that variable is defined). |
The problem is because you're defining a unique |
Sorry, that was my fault. I don't think @edouard-lopez was doing that before, though, or am I missing something? |
Tmux
Tried without Suggestion
No suggestion either Permissions
But my
|
@krader1961 What do you mean define |
That seems like #2335, which was supposed to be fixed in 2.3.0. When you fix the permissions and do stuff like run fish in
The |
Just to be clear, you could also remove the file, but then you need to ensure that it is created first with the correct permissions, ie. run some commands and ideally |
I just realize my restore script is run as Solution
|
I'm having this exactly same issue with the last git version. I opened two fish instances using a temp dir for home, and when I do a Reproduce:
Results:
Instance 2
Basically, it looks like the most recently executed command doesn't merge, but sometimes its even several of the last commands. I'm looking at What would cause |
What you're seeing, @cjthompson, is a different problem. Based on my testing what is happening is that sometimes a fish instance doesn't notice that fish history file has changed and continues writing to an old, no longer existing, history file. Which also means that when you do You can see this by running @cjthompson: Can you confirm what I wrote above explains why history syncing doesn't work for you? |
I'll bet this is a funny ordering problem due to history commands manipulating the history and also expecting to be in the history. Edit: could also be Edit2: d'oh, I think we're just forgetting to update |
@ridiculousfish: Mind adding that comment to issue #3565. I haven't looked at the code yet in light of your hypothesis to see if that explains what I've observed. Namely, some fish shells never notice that the history file inode has changed; i.e., the history file has been replaced by a new file. |
Sure, done |
Prevents an issue where we think we've written out history items, but we haven't, and so they get lost. Fixes #3496
Not zeroing Please give it a try and let us know if it doesn't work. The fix is 9b4310b |
I am having this issue with 2.4.0 sometimes but not all the time. I will try out 9b4310b. I also wanted to say that the |
Both will work although the flag form is now deprecated but won't be removed before the next major release. Same for the |
related: History synchronization
Env
fish version installed (
fish --version
):OS:
Terminal
tmux
config.fish
See my
dotfiles
repo for myconfigh.fish
Reproduction steps
fish
process) ;echo pom
in fish-1 instance ;echo pom
.Results
No trace of
echo pom
command even when runninghistory --merge
on both fish instanceupdate:
config.fish
link.The text was updated successfully, but these errors were encountered: