From ecc9e95b8f5851debfd870ab1aa0e2f6a3d0a8b3 Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Wed, 15 Jun 2016 18:46:54 -0700 Subject: [PATCH] [environment] better bracketed paste zsh >=5.2 --- modules/environment/init.zsh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/environment/init.zsh b/modules/environment/init.zsh index 5c27ef2..e0f182d 100644 --- a/modules/environment/init.zsh +++ b/modules/environment/init.zsh @@ -5,12 +5,17 @@ # use smart URL pasting and escaping autoload -Uz is-at-least if [[ ${ZSH_VERSION} != 5.1.1 ]]; then - if is-at-least 5.1; then - autoload -Uz bracketed-paste-magic - zle -N bracketed-paste bracketed-paste-magic + if is-at-least 5.2; then + autoload -Uz bracketed-paste-url-magic + zle -N bracketed-paste-url-magic + else + if is-at-least 5.1; then + autoload -Uz bracketed-paste-magic + zle -N bracketed-paste bracketed-paste-magic + fi + autoload -Uz url-quote-magic + zle -N self-insert url-quote-magic fi - autoload -Uz url-quote-magic - zle -N self-insert url-quote-magic fi # Treat single word simple commands without redirection as candidates for resumption of an existing job.