zsh-users
 help / color / mirror / code / Atom feed
From: Forrest Aldrich <forrie@gmail.com>
To: zsh-users@zsh.org
Subject: Re: Shell history, the same in each session
Date: Sun, 17 Jan 2021 15:46:40 -0500	[thread overview]
Message-ID: <de6cec05-ef0f-1fe3-adcb-9dd1dfc9bfe6@gmail.com> (raw)
In-Reply-To: <da2c5096-9444-9276-f186-0546ab3b423c@gmx.com>

[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]



On 1/17/21 3:36 PM, Eric Cook wrote:
> On 1/16/21 4:25 PM, Forrest Aldrich wrote:
>> I'm somewhat new to ZSH; however, I'm using the DEV version on MacOS 
>> Big Sur and I do keep it up to date.
>>
>> One issue I'm having is that my ZSH shell history seems to be unified 
>> -- that is, in different terminal windows I get shell history from 
>> separate sessions, which is not what I would expect (or desire).  It 
>> makes finding recent commands a pain -- and I
>> wonder if there is a setting I've overlooked that will keep shell 
>> history in the current window isolated to that terminal session 
>> (until I exit, etc).
>>
>> Thanks.
>>
>>
> Something is enabling the share_history option, by default it is off.
> you could ''unsetopt share_history'' to disable it or find where it is 
> being set and remove it.
>


Thank you!

I am using Oh-My-Zsh and I found this, in ./lib/history.zsh:

## History command configuration
setopt extended_history       # record timestamp of command in HISTFILE
setopt hist_expire_dups_first # delete duplicates first when HISTFILE 
size exceeds HISTSIZE
setopt hist_ignore_dups       # ignore duplicated commands history list
setopt hist_ignore_space      # ignore commands that start with space
setopt hist_verify            # show command with history expansion to 
user before running it
*setopt share_history          # share command history data*


Seems like an odd default assumption to have.



_F

[-- Attachment #2: Type: text/html, Size: 2217 bytes --]

      reply	other threads:[~2021-01-17 20:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-16 21:25 Forrest Aldrich
2021-01-17 20:36 ` Eric Cook
2021-01-17 20:46   ` Forrest Aldrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de6cec05-ef0f-1fe3-adcb-9dd1dfc9bfe6@gmail.com \
    --to=forrie@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).