From c3fbd97f9bf1b7fb6ec962d78761d872d570a850 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 15 Sep 2016 20:13:29 +0200 Subject: bracketed-paste-url-magic: Handle magnet links too, and allow for schemes without // --- Functions/Zle/bracketed-paste-url-magic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Functions/Zle') diff --git a/Functions/Zle/bracketed-paste-url-magic b/Functions/Zle/bracketed-paste-url-magic index 06dee2657..b894696bb 100644 --- a/Functions/Zle/bracketed-paste-url-magic +++ b/Functions/Zle/bracketed-paste-url-magic @@ -19,7 +19,7 @@ # The default can be seen just below. local -a schema -zstyle -a :bracketed-paste-url-magic schema schema || schema=(http https ftp ftps file ssh sftp) +zstyle -a :bracketed-paste-url-magic schema schema || schema=(http:// https:// ftp:// ftps:// file:// ssh:// sftp:// magnet:) local wantquote=${NUMERIC:-0} local content @@ -28,7 +28,7 @@ local start=$#LBUFFER zle .$WIDGET -N content if (( $wantquote == 0 )); then - if [[ $content = (${(~j:|:)schema})://* ]]; then + if [[ $content = (${(~j:|:)schema})* ]]; then wantquote=1 fi fi -- cgit 1.4.1