From 59391837bce90cff40883c2b2dbcf1093980ab86 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 12 Nov 2022 19:18:45 +0300 Subject: [PATCH] Strip trailing newlines from bracketed pastes --- zsh/.zsh/rc/025paste-notrailing-newline.zsh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 zsh/.zsh/rc/025paste-notrailing-newline.zsh diff --git a/zsh/.zsh/rc/025paste-notrailing-newline.zsh b/zsh/.zsh/rc/025paste-notrailing-newline.zsh new file mode 100644 index 0000000..18741e1 --- /dev/null +++ b/zsh/.zsh/rc/025paste-notrailing-newline.zsh @@ -0,0 +1,4 @@ +bracketed-paste() { + zle .$WIDGET && LBUFFER=${LBUFFER%$'\n'} +} +zle -N bracketed-paste -- 2.44.0