From 4a934de7549047328fcfd9c4d82cac905b62733b Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Sat, 26 Dec 2015 00:32:25 -0500 Subject: [PATCH] add url-paste "if" based on ZSH_VERSION --- modules/environment/init.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/environment/init.zsh b/modules/environment/init.zsh index 94e605e..58bc501 100644 --- a/modules/environment/init.zsh +++ b/modules/environment/init.zsh @@ -3,9 +3,12 @@ # # use smart URL pasting and escaping -autoload -Uz url-quote-magic bracketed-paste-magic +if [[ ${ZSH_VERSION} -ge 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 -zle -N bracketed-paste bracketed-paste-magic # Treat single word simple commands without redirection as candidates for resumption of an existing job. setopt AUTO_RESUME