From 2fb326513a9e2cec473cff88669da890ad4ae834 Mon Sep 17 00:00:00 2001 From: Dan Mills Date: Wed, 10 Jun 2015 15:49:47 -0700 Subject: [PATCH] Only load url-quote-magic if it is available. Partially fixes #3614 --- lib/misc.zsh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/misc.zsh b/lib/misc.zsh index 0b7cb2696..92e336b64 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -1,6 +1,10 @@ -## smart urls -autoload -U url-quote-magic -zle -N self-insert url-quote-magic +## Load smart urls if available +for d in $fpath; do + if [[ -e "$d/url-quote-magic"]]; then + autoload -U url-quote-magic + zle -N self-insert url-quote-magic + fi +done ## jobs setopt long_list_jobs