summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2019-09-24 10:07:32 -0700
committerBart Schaefer <schaefer@zsh.org>2019-09-24 10:07:32 -0700
commit530d6337e69941a5cd802fa7808aae8f33ab1fe9 (patch)
tree8541f566608a302e0e02d72ee501bfd893a6ebf6
parent39e39910eb9180bce87c664ab1fe90e97845f01e (diff)
downloadzsh-530d6337e69941a5cd802fa7808aae8f33ab1fe9.tar.gz
zsh-530d6337e69941a5cd802fa7808aae8f33ab1fe9.tar.xz
zsh-530d6337e69941a5cd802fa7808aae8f33ab1fe9.zip
unposted (see 44772): quote the string argument to zle -U
-rw-r--r--ChangeLog5
-rw-r--r--Functions/Zle/bracketed-paste-magic4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 98c118527..eef3750a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-24  Bart Schaefer  <schaefer@brasslantern.com>
+
+	* unposted (see 44772): Functions/Zle/bracketed-paste-magic:
+	quote the string argument to zle -U
+
 2019-09-20  Jun-ichi Takimoto  <takimoto-j@kba.biglobe.ne.jp>
 
 	* 44768: Completion/Unix/Command/_tar: improve completion of
diff --git a/Functions/Zle/bracketed-paste-magic b/Functions/Zle/bracketed-paste-magic
index 4baae823e..840091b44 100644
--- a/Functions/Zle/bracketed-paste-magic
+++ b/Functions/Zle/bracketed-paste-magic
@@ -162,7 +162,7 @@ bracketed-paste-magic() {
 
 	# There are active widgets.  Reprocess $PASTED as keystrokes.
 	NUMERIC=1
-	zle -U - $PASTED
+	zle -U - "$PASTED"
 
 	# Just in case there are active undo widgets
 
@@ -212,7 +212,7 @@ bracketed-paste-magic() {
     # Arrange to display highlighting if necessary
     if [[ -z $zle_highlight || -n ${(M)zle_highlight:#paste:*} ]]; then
 	zle -R
-	zle .read-command && zle -U - $KEYS
+	zle .read-command && zle -U - "$KEYS"
     fi
 }