summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2018-12-19 22:30:54 +0100
committerAlan Pearce2018-12-19 22:30:54 +0100
commit9e804f6fde15bcd94e46910e758a91e55502a881 (patch)
tree956ce41fe4fd7c3c9792a47f4de10f7bb8d183f8
parent9ffb44641297d54a19983edd90b2d0d347970e36 (diff)
downloaddotfiles-9e804f6fde15bcd94e46910e758a91e55502a881.tar.lz
dotfiles-9e804f6fde15bcd94e46910e758a91e55502a881.tar.zst
dotfiles-9e804f6fde15bcd94e46910e758a91e55502a881.zip
zsh: auto-create HISTFILE dir on startup
-rw-r--r--zsh/.config/zsh/.zshrc1
1 files changed, 1 insertions, 0 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
index e8458f8..18f04a9 100644
--- a/zsh/.config/zsh/.zshrc
+++ b/zsh/.config/zsh/.zshrc
@@ -6,6 +6,7 @@ autoload -Uz _zplugin
 HISTSIZE=10000
 SAVEHIST=20000
 HISTFILE=${XDG_CACHE_HOME:=$HOME/.cache}/zsh/history
+[[ -d ${HISTFILE:h} ]] || mkdir -p ${HISTFILE:h}
 setopt extended_history
 setopt hist_save_no_dups
 setopt hist_ignore_space