1

I am using Zsh with 'oh-my-zsh' with iTerm2 on macoxs. I find that when I execute 'history', it only list the command of my current tab. How can I save the history

  • among all the tabs in iTerm
  • even when I exit iTerms?
si Hwang
  • 123

2 Answers2

1

Add to your ~/.zshrc file:

setopt share_history

Documentation here: http://zsh.sourceforge.net/Doc/Release/Options.html#index-share-history

-1

install this plugin on your zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)"

then, in your .zshrc file, paste these commands at the end of the file

zinit light zdharma/fast-syntax-highlighting
zinit light zsh-users/zsh-autosuggestions
zinit light zsh-users/zsh-completions