On Sat, Oct 7, 2017, at 17:50, Mark Volkmann wrote: > On Sat, Oct 7, 2017 at 3:52 PM, Greg Reagle <greg.rea...@umbc.edu> wrote: > > As far as I understand, it is not true that it "manage to only recall > > commands that belong to the current session". Fish remembers commands > > from previous sessions. In your article you have "How does this one > > file keep a separate history for each session?" Why do you think that? > > I don't think it's true. > > > > Here's what I did that made me think this: > - open a new fish session > - enter commands like "ls" and "date" > - open another new fish session from within the first > (In my case I did this by creating a new tmux pane, not by just > entering > "fish".) > - press up arrow to recall the last two commands and note that they are > the > ones from the first session, > so the new session is aware of those > - enter commands in the second session like "cd foo" and "cd -" > - press up arrow to recall the last two commands and note that these cd > commands are present > - switch to the first session > - press up arrow to recall the last command and not that it is not one of > the cd commands from the second session
I get the same type of behavior, using separate terminal emulator windows in X11 (multiple st windows, where st is like xterm) and not using tmux, so I don't think tmux in particular is relevant here. If you close both fish sessions and then start a new one, you'll see all the commands from both sessions are in the history. > So it seems that each new session starts with the command history of its > parent, but then maintains its own after that. > Is this wrong? Perhaps my use of tmux is the key to my misunderstanding. I think that your conclusion does not follow. I don't know the internals of fish session history and how sessions' history interact with each other as I am just a fish user, not a fish developer. If you examine the fish history file, you'll see that there is no information about which session. And if you close all fish sessions and open a new one, the history of all sessions will be there and "unified". ------------------------------------------------------------------------------ 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