From: Sergey Matveev Date: Sat, 12 Nov 2022 16:18:45 +0000 (+0300) Subject: Strip trailing newlines from bracketed pastes X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=59391837bce90cff40883c2b2dbcf1093980ab86 Strip trailing newlines from bracketed pastes --- 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