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`.
This commit is contained in:
2021-03-09 15:47:09 +01:00
parent 93225e2d66
commit 48dc9ca561

View File

@@ -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