]> Sergey Matveev's repositories - dotfiles.git/blobdiff - zsh/.zsh/rc/025paste-notrailing-newline.zsh
Strip trailing newlines from bracketed pastes
[dotfiles.git] / 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 (file)
index 0000000..18741e1
--- /dev/null
@@ -0,0 +1,4 @@
+bracketed-paste() {
+    zle .$WIDGET && LBUFFER=${LBUFFER%$'\n'}
+}
+zle -N bracketed-paste