zsh: Add widget example

This commit is contained in:
Mathieu Maret 2020-08-15 23:28:01 +02:00
parent 8448da892a
commit f2bcdc906c
1 changed files with 8 additions and 0 deletions

8
.zsh/50_widget.zsh Normal file
View File

@ -0,0 +1,8 @@
# see http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#index-parameters_002c-zle
function watch_fonction() {
zle quote-line
BUFFER="watch -n1 ${BUFFER}"
zle accept-line
}
zle -N watch_widget watch_fonction
#bindkey '^t' watch_widget