about summary refs log tree commit diff
path: root/pkgs/shells/zsh
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-02-11 18:49:14 +0000
committerGitHub <noreply@github.com>2020-02-11 18:49:14 +0000
commitf3d5966f4345778a2b92f510c5abd353ec96dd0a (patch)
tree3686ff06dab1d3603a9fe3bede104657361fe4ef /pkgs/shells/zsh
parent053006ecac16e6828ba483b362ba0efd6e7e744d (diff)
parent8f5af404d26c54c238d32e12a007a622c931496e (diff)
downloadnixlib-f3d5966f4345778a2b92f510c5abd353ec96dd0a.tar
nixlib-f3d5966f4345778a2b92f510c5abd353ec96dd0a.tar.gz
nixlib-f3d5966f4345778a2b92f510c5abd353ec96dd0a.tar.bz2
nixlib-f3d5966f4345778a2b92f510c5abd353ec96dd0a.tar.lz
nixlib-f3d5966f4345778a2b92f510c5abd353ec96dd0a.tar.xz
nixlib-f3d5966f4345778a2b92f510c5abd353ec96dd0a.tar.zst
nixlib-f3d5966f4345778a2b92f510c5abd353ec96dd0a.zip
Merge pull request #78819 from Izorkin/zsh-fix
zsh: fix bracketed-paste-magic
Diffstat (limited to 'pkgs/shells/zsh')
-rw-r--r--pkgs/shells/zsh/bracketed-paste-magic.patch22
-rw-r--r--pkgs/shells/zsh/default.nix7
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/shells/zsh/bracketed-paste-magic.patch b/pkgs/shells/zsh/bracketed-paste-magic.patch
new file mode 100644
index 000000000000..f22f6489ce7a
--- /dev/null
+++ b/pkgs/shells/zsh/bracketed-paste-magic.patch
@@ -0,0 +1,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
+ }
+ 
diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix
index 0a26b8a78210..52bd3c71858e 100644
--- a/pkgs/shells/zsh/default.nix
+++ b/pkgs/shells/zsh/default.nix
@@ -18,6 +18,13 @@ stdenv.mkDerivation {
     sha256 = "1s3yww0mzgvpc48kp0x868mm3gbna42sbgzya0nknj0x5hn2jq3j";
   };
 
+  patches = [
+    # Bracketed-paste-magic error in Putty due to empty $PASTED variable
+    # http://www.zsh.org/mla/workers/2019/msg00808.html
+    # This patch included in the next version
+    ./bracketed-paste-magic.patch
+  ];
+
   buildInputs = [ ncurses pcre ];
 
   configureFlags = [