Yuri Khan wrote: >> Isn't it obvious? If I have several terminals open at the >> same time (and I seldom have fewer than, say, three, >> usually more), sharing history is very useful. It easy to >> remember that I issued some kind of command, but much more >> difficult to remember in which terminal I did it. > > To add to this: The original terminal where I issued the > command I need might be busy, e.g. if I started some > application in it. It might be inconvenient to suspend that > application just to get at the command. Important special > case: the application that’s occupying the terminal where > the original command was entered is Midnight Commander > running a sub-shell in which I want to repeat that command.
Can you have both? Local history and global history. You have a command to switch which one is at play. 'gh' for global history, 'lh' for local and 'th' for toggle. That way you would also see what you would use. It is possible you would actually just use the global one as you say. How do I get global history for zsh? I have this file in play - it sounds like global history, but maybe it is session local, then? So it should be "live" between sessions as well? How do you get that? #! bin/zsh # # this file: # https://dataswamp.org/~incal/conf/.zsh/history setopt appendhistory setopt histignorealldups HISTSIZE=1000 SAVEHIST=$(( 10 * $HISTSIZE )) HISTFILE=~/.zsh-history -- underground experts united https://dataswamp.org/~incal --- via emacs-tangents mailing list (https://lists.gnu.org/mailman/listinfo/emacs-tangents)