From 48dc9ca561af87bb3740001cbcd0bfa06793299e Mon Sep 17 00:00:00 2001 From: druckdev Date: Tue, 9 Mar 2021 15:47:09 +0100 Subject: [PATCH] zsh:keys:cmd-on-enter: Add reset on other command If a command is normally executed CMD_ON_ENTER is reseted to `ls`. Otherwise problems can occur when for example switching the directory to a non-repo when CMD_ON_ENTER contains `gs`. --- .config/zsh/zshrc.d/60-keys.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/zsh/zshrc.d/60-keys.zsh b/.config/zsh/zshrc.d/60-keys.zsh index 1b6df9f..22be046 100644 --- a/.config/zsh/zshrc.d/60-keys.zsh +++ b/.config/zsh/zshrc.d/60-keys.zsh @@ -111,6 +111,9 @@ function cmd-on-enter { gs) CMD_ON_ENTER='ls';; esac + else + # Reset if other command is executed + CMD_ON_ENTER=ls fi zle accept-line