diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-04-16 10:09:29 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-04-16 10:09:29 +0200 |
commit | 692bc52c20da866630fa401be6740bc38f8f8574 (patch) | |
tree | be52e621dbbb15bfd2f43ec92053e4b0a817c392 /config/essentials/zsh/widgets.zsh | |
parent | 197a1a74f468d9d69d624b19f90280a3946455e5 (diff) | |
parent | 19ea61db733c9152f2b334b0ae9871f81ac3664d (diff) |
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'config/essentials/zsh/widgets.zsh')
-rw-r--r-- | config/essentials/zsh/widgets.zsh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/config/essentials/zsh/widgets.zsh b/config/essentials/zsh/widgets.zsh index c8b24f7..233ea65 100644 --- a/config/essentials/zsh/widgets.zsh +++ b/config/essentials/zsh/widgets.zsh @@ -1,4 +1,4 @@ -# surround line in variable +# Surround line in variable surround_in_var() { BUFFER=" \"\$($BUFFER)\"" @@ -7,3 +7,12 @@ surround_in_var() zle -N surround_in_var bindkey '\ev' surround_in_var +# Insert output from the previous command +zmodload -i zsh/parameter +insert-last-command-output() { + LBUFFER+="$(eval $history[$((HISTCMD-1))])" +} +zle -N insert-last-command-output +bindkey "^Xl" insert-last-command-output + +# |