On Sat, Oct 7, 2017, at 20:18, Mark Volkmann wrote:
> Here's another way to test this.
> - open two fish sessions
> - in the first, enter "echo one"
> - in the second, enter "echo two"
> - in the first, enter "echo three"
> - in the second, enter "echo four"
> 
> Enter "tail ~/.local/share/fish/fish_history" in both. Of course they
> will
> be identical (same file) and will contain all four echo commands.
> But command recall in either session only recalls the echo commands
> entered
> in that session.
> I don't think there is enough information in the fish_history file to
> support doing that, so something else must be at play.
> Another interesting thing is that if you enter "history -n 5" in both,
> you
> will only see the echo commands entered in the session where that command
> is run.
> So I'm still wondering how fish is able to keep the commands from each
> session separate.

Okay, I see your point and I think I understand what you are asking.  I
know nothing about the internals of fish since I am just a user, but I
conclude that a fish session uses *all* of the history file *before* the
start of the session, and only its *own* history *after* the start of
the session.  Whether it does that via RAM or selective use of the
history file I don't know.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to