Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Handle magnet links too, and allow for uris without //
- X-seq: zsh-workers 39351
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: Handle magnet links too, and allow for uris without //
- Date: Thu, 15 Sep 2016 20:35:16 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=cXjA2AgPknP6LNU8DMiV8YPhn3x3L/PEJghW8pNYkCk=; b=L/pMi5neZoj4j8jCfTcO91aagg9HO3k6mMVMFqMLhtrn/Sil38jrZchlnOx66RY2DQ Eo1TEyf/a644jLfS8a+XJHQ3/m5a9sRmUq4v/3g86P1u+ovzk732psDc7pKmyRBO0olk 2fI1qJeMT+Q9FVDwX1UiU4Rb2my+03381nR+Y4kT1qIwXP3ngKobo1zGsI+OHIOEEH2A 13OzjxUfQhop/QE5xJ/RjnvNic6438IILj1gV+XIJ36kp2sXFotZInrJc6dctvoSa+QU BgSXoyRKuLeQgb5O8eDslSKnVPRe8D5ZkNioB1o/y2uEMXTzwF3eUA8co4zsh4+qF7TP 0FaA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
---
Functions/Zle/bracketed-paste-url-magic | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Functions/Zle/bracketed-paste-url-magic b/Functions/Zle/bracketed-paste-url-magic
index 06dee26..b894696 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
--
2.8.2
Messages sorted by:
Reverse Date,
Date,
Thread,
Author