From 51e4f9178f9945b8d46e355ca23fa0551ba6a2ad Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 24 Mar 2022 01:08:39 +0100 Subject: [PATCH] Zsh: Fix history import again --- .config/zsh/.zshrc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 854f9f1..6eb8b1b 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -21,13 +21,12 @@ setopt HIST_EXPIRE_DUPS_FIRST HIST_IGNORE_DUPS setopt HIST_IGNORE_SPACE HIST_REDUCE_BLANKS HIST_VERIFY # Import new commands from the history file -function _my_history_precmd() +function _my_history_preexec() { - # fc -RI just does not work 🤷 - fc -R + fc -RI } autoload -Uz add-zsh-hook -add-zsh-hook precmd _my_history_precmd +add-zsh-hook preexec _my_history_preexec ############################## Plugins #########################################