X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=5a74feedf7413ac4c4c6cea54237370b74c645ce;hb=4db20203215091835dbf4aab193a620800f1f25c;hp=03d9c4db61a9f4ada579ee04971c86ae0f59a1ed;hpb=86f2a9b8bb82077734fbb907bd24beedf65da6c2;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 03d9c4d..5a74fee 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -172,6 +172,11 @@ EOF # check for version/system # check for versions (compatibility reasons) +function is51 () { + [[ $ZSH_VERSION == 5.<1->* ]] && return 0 + return 1 +} + function is4 () { [[ $ZSH_VERSION == <4->* ]] && return 0 return 1 @@ -1645,7 +1650,13 @@ zrcautoload zed # else # print 'Notice: no url-quote-magic available :(' # fi -alias url-quote='autoload -U url-quote-magic ; zle -N self-insert url-quote-magic' +if is51 ; then + # url-quote doesn't work without bracketed-paste-magic since Zsh 5.1 + alias url-quote='autoload -U bracketed-paste-magic url-quote-magic; + zle -N bracketed-paste bracketed-paste-magic; zle -N self-insert url-quote-magic' +else + alias url-quote='autoload -U url-quote-magic ; zle -N self-insert url-quote-magic' +fi #m# k ESC-h Call \kbd{run-help} for the 1st word on the command line alias run-help >&/dev/null && unalias run-help