summary refs log tree commit diff
path: root/pkgs/shells/zsh/bracketed-paste-magic.patch
blob: f22f6489ce7a2d90cdc1b53825dfdea13e78a901 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/Functions/Zle/bracketed-paste-magic b/Functions/Zle/bracketed-paste-magic
index 4baae82..840091b 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
 }