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)
|
gs)
|
||||||
CMD_ON_ENTER='ls';;
|
CMD_ON_ENTER='ls';;
|
||||||
esac
|
esac
|
||||||
|
else
|
||||||
|
# Reset if other command is executed
|
||||||
|
CMD_ON_ENTER=ls
|
||||||
fi
|
fi
|
||||||
zle accept-line
|
zle accept-line
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user