From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17610 invoked from network); 17 Jan 2021 20:47:13 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Jan 2021 20:47:13 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1610916433; b=Clm1qveeAZ7AAlcTr0tbPMMUHGVZHUVhw0DPSvNhfsVUanrFrqqGfT2+4HDxMAFrph7JUy+C1k UxV3Im0ih3sMpv6onHd9cMU2wiIE8wxjLRUmivZjyFlbACEh1ttahOklkB38LBmgdSSGGzZ4bb 2mROdSvAVtJBtYsIGqHtVbgtJ+TCi0ETQ2yrD8G1I0tEiYlaOfZ2/a/W80bdYiJe0J7QdA0M+k S0AdL+3BKXPedsPL5U44bYoCicnXZroaFasazGCJaXU3CEFle9QT1U7ED3JCGwTaSolbfGnUJ0 l5rf/rERVZjGff8eyqobtr20XWR2wrhUcDFycxWu9EIgMQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-qv1-f45.google.com) smtp.remote-ip=209.85.219.45; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1610916433; bh=WjcgplpYkAVc90VegcCT1iov1n7WUjN7PXrBlMznaY0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:DKIM-Signature:DKIM-Signature; b=RkTpqRoSKY6Wf519cRc0WLdysOC0z1D+c6KPgvZiM7RsDhzqFEyCRFkf/17R9Gm/qo8y5bVEWo VheX1foBq+XDyct5h/La98B7RFzNUJXOcP4WbvqaEfy5IC2yjhwCCmxM2fi2fnuNbFcBruQJWD wTt0LGvuUqx6HpObLgy9M9fI81lEQ6bxyAZMoLcAhBovautDCv9lVJOgJ8HfgJGDhxN5fSYlHJ Ei2wV16U7z34vXDeScjjJoQgTF+RyahGqKp94PXgsyhutORc/XRwrAxDYAxy5E1vupidUbP/Ve sWaIBborwbRysks1JjRSG9/+wpb12rRRqISo874/ZmZArw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:In-Reply-To:MIME-Version :Date:Message-ID:From:References:To:Subject:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=K0U+EDpjWjseEJg6D6UrmAF7VWzR3RnIxGimLk/dhAw=; b=c5K/MeC6W2GiP4mf2TeBJwIwiA 8P6MbXDLlfIZfhCi8RMexWJhpT1LpMqhmqL/73Ei3B7PvEj4WOqS4CS9Ssr0Zc86gebrnJHCKRjOb JFkBUu/tPN6cW25bYrTJn0ZhE4bvfn4YGmaOWGbQN6s/iWD30l3d5pZ/CIr+lwW7FmPX0kRDyu5/N E3sX+RoAOvGBlprkb77Pp9SoCJUeYgOfmrUq3DA8UPhztvzz+y5ODxHxKYleJFRCNhERoGHANvhkN 8BVNQmJmBaVfwibZiZwv5gK3pHCRGtYLxs5oV7tBzhZ9gcj+jKoxuc4H8oyJwoH2nccla/ry28xvB /XD3G/tw==; Received: from authenticated user by zero.zsh.org with local id 1l1Ex7-000D7v-5B; Sun, 17 Jan 2021 20:47:13 +0000 Authentication-Results: zsh.org; iprev=pass (mail-qv1-f45.google.com) smtp.remote-ip=209.85.219.45; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-qv1-f45.google.com ([209.85.219.45]:39509) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1l1Ewd-000CkV-Tq; Sun, 17 Jan 2021 20:46:44 +0000 Received: by mail-qv1-f45.google.com with SMTP id s6so6633466qvn.6 for ; Sun, 17 Jan 2021 12:46:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=K0U+EDpjWjseEJg6D6UrmAF7VWzR3RnIxGimLk/dhAw=; b=Kv924IiyAvhwOTG+7n2qHCvrZ5ipTaZc+yLm0Fn62aPx5byl+Au2gcEhCWwO/u+hKg Yft5/fm8EyKo26UGcm6zKWK1DGqN1lkyNO7seMYwvoaZCAJkYdFanDcK5WtzBS+95QLV V87vZcUh6h7k47PfLRnEhgOKvd8OXmzXNfuVhhvoLrwBaqkrV31EwplZiEJKDT7lnNSI OSX7qi+YpbzpY3jyzwTHLxt2e370Zde/VTlMIG+o4VosDOwy4UtSMWY5TBM8YeXGf4eP CYImZB2O/GKzgvb30eWxfOCQcBFK6sYLz+WS902DlyngKBI8aQ6zKZIuR1jj/jnvzwPN nvmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=K0U+EDpjWjseEJg6D6UrmAF7VWzR3RnIxGimLk/dhAw=; b=VU7ZQmEmbPh3GA+/0dE5FE3plJCsCgKl9XA8ZaQCH2ksp3E25PU89IzW+yqlVj+GkL XZX2HiMnPQTpuQm8nf/DtAaQoR5EhhSkb7yTI9c+KuWKuibASAE3CS5Nxfkvav12fFRr vFqa1iQ1V8ebxLqHWST6pB0re0kupbvVv9D5iek0VUyokTHwoal+/ma4lXUTNup0Sxjm x/PyE8mgQn2lA4olMjmJrZr13sCRdFcii7TtEyE8y1eIOcoaEZpH1ZeVu3LKChAAldmG /rZuq1Rq9KMIBvNLI1kDjsXQGLVeTrXh4Xm+30dGzwDot5E0knDqy/fPd7r8Tq5lhkLQ ZUow== X-Gm-Message-State: AOAM532ltRLTAXbNMf1TNyMo7jL+qEOYDMgM2MKHc9AtLlyc/ghX82Km zFa2fCQ7CuFcTS4Ta8TybvRgNgNvPYo= X-Google-Smtp-Source: ABdhPJxCe7j7p7klOpBR8H7kjSGJSMbNz1Qw7ciQAj414FA44szZpOlKubPepgKeCiAVWmf18Qz3Ew== X-Received: by 2002:a0c:efc9:: with SMTP id a9mr21117998qvt.31.1610916402377; Sun, 17 Jan 2021 12:46:42 -0800 (PST) Received: from MacbookPro.local (c-73-249-174-88.hsd1.nh.comcast.net. [73.249.174.88]) by smtp.gmail.com with ESMTPSA id q37sm8975575qte.10.2021.01.17.12.46.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Jan 2021 12:46:41 -0800 (PST) Subject: Re: Shell history, the same in each session To: zsh-users@zsh.org References: From: Forrest Aldrich Message-ID: Date: Sun, 17 Jan 2021 15:46:40 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------DF3DDED004587B7121FCFFBE" Content-Language: en-US X-Seq: 26387 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: This is a multi-part message in MIME format. --------------DF3DDED004587B7121FCFFBE Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------DF3DDED004587B7121FCFFBE Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

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
--------------DF3DDED004587B7121FCFFBE--