From f2bcdc906c5af56373d31abe7742dc3bed9d9201 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Sat, 15 Aug 2020 23:28:01 +0200 Subject: [PATCH] zsh: Add widget example --- .zsh/50_widget.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .zsh/50_widget.zsh diff --git a/.zsh/50_widget.zsh b/.zsh/50_widget.zsh new file mode 100644 index 0000000..0f76714 --- /dev/null +++ b/.zsh/50_widget.zsh @@ -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