Merge pull request #78819 from Izorkin/zsh-fix

zsh: fix bracketed-paste-magic
This commit is contained in:
Jörg Thalheim 2020-02-11 18:49:14 +00:00 committed by GitHub
commit f3d5966f43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View file

@ -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
}

View file

@ -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 = [