aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/zshrc.org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2016-10-29 11:00:18 +0200
committerGravatar Tom Willemse2016-10-29 11:00:18 +0200
commit3e5646f4b5bd135255275918d0ad64307756b940 (patch)
tree562f70895a163188dab331bd1ad5b4626d0d6d2d /zsh/zshrc.org
parentbf4fa1fd5953c97ea93311c68673bc7ecee1020c (diff)
downloadnew-dotfiles-3e5646f4b5bd135255275918d0ad64307756b940.tar.gz
new-dotfiles-3e5646f4b5bd135255275918d0ad64307756b940.zip
Add history settings for ZSH
Diffstat (limited to 'zsh/zshrc.org')
-rw-r--r--zsh/zshrc.org32
1 files changed, 32 insertions, 0 deletions
diff --git a/zsh/zshrc.org b/zsh/zshrc.org
index 919de03..e866ce2 100644
--- a/zsh/zshrc.org
+++ b/zsh/zshrc.org
@@ -17,6 +17,38 @@ Autoload any ZSH function from =$HOME/.zsh/functions=.
alias scsh="rlwrap scsh"
#+END_SRC
+* History
+
+ Store ZSH history in a non-intrusive place.
+
+ #+BEGIN_SRC sh
+ HISTFILE=$HOME/.zsh/histfile
+ #+END_SRC
+
+ Keep at most 1000 previous commands in memory.
+
+ #+BEGIN_SRC sh
+ HISTSIZE=1000
+ #+END_SRC
+
+ Save at most 1000 previous commands to disk.
+
+ #+BEGIN_SRC sh
+ SAVEHIST=1000
+ #+END_SRC
+
+ Allow multiple shell instances to share the same history.
+
+ #+BEGIN_SRC sh
+ setopt SHARE_HISTORY
+ #+END_SRC
+
+ Don't remember duplicated commands.
+
+ #+BEGIN_SRC sh
+ setopt HIST_IGNORE_ALL_DUPS
+ #+END_SRC
+
* Plug-ins
Load zplug, a next generation zsh plugin manager.