zsh-users
 help / color / mirror / Atom feed
* Shell history, the same in each session
@ 2021-01-16 21:25 Forrest Aldrich
  2021-01-17 20:36 ` Eric Cook
  0 siblings, 1 reply; 3+ messages in thread
From: Forrest Aldrich @ 2021-01-16 21:25 UTC (permalink / raw)
  To: zsh-users

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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Shell history, the same in each session
  2021-01-16 21:25 Shell history, the same in each session Forrest Aldrich
@ 2021-01-17 20:36 ` Eric Cook
  2021-01-17 20:46   ` Forrest Aldrich
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Cook @ 2021-01-17 20:36 UTC (permalink / raw)
  To: zsh-users

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Shell history, the same in each session
  2021-01-17 20:36 ` Eric Cook
@ 2021-01-17 20:46   ` Forrest Aldrich
  0 siblings, 0 replies; 3+ messages in thread
From: Forrest Aldrich @ 2021-01-17 20:46 UTC (permalink / raw)
  To: zsh-users

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-17 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-16 21:25 Shell history, the same in each session Forrest Aldrich
2021-01-17 20:36 ` Eric Cook
2021-01-17 20:46   ` Forrest Aldrich

zsh-users

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-users zsh-users/ http://inbox.vuxu.org/zsh-users \
		zsh-users@zsh.org
	public-inbox-index zsh-users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


code repositories for the project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git