zsh: run zle reset-prompt in each widget

Instead of having to press the Enter key after running a widget, use
`zle reset-prompt` to reset the prompt.
This commit is contained in:
Oliver Davies 2024-07-24 08:01:01 +01:00
parent 15d6fa1aab
commit b944d20123

View file

@ -44,24 +44,28 @@
clear-ls-all() {
clear
ls -al
zle reset-prompt
}
zle -N clear-ls-all
clear-git-status() {
clear
git status -sb .
git status
zle reset-prompt
}
zle -N clear-git-status
clear-tree-2() {
clear
tree -L 2
zle reset-prompt
}
zle -N clear-tree-2
clear-tree-3() {
clear
tree -L 3
zle reset-prompt
}
zle -N clear-tree-3