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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user