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-all() {
clear clear
ls -al ls -al
zle reset-prompt
} }
zle -N clear-ls-all zle -N clear-ls-all
clear-git-status() { clear-git-status() {
clear clear
git status -sb . git status
zle reset-prompt
} }
zle -N clear-git-status zle -N clear-git-status
clear-tree-2() { clear-tree-2() {
clear clear
tree -L 2 tree -L 2
zle reset-prompt
} }
zle -N clear-tree-2 zle -N clear-tree-2
clear-tree-3() { clear-tree-3() {
clear clear
tree -L 3 tree -L 3
zle reset-prompt
} }
zle -N clear-tree-3 zle -N clear-tree-3