* PATCH: Handle magnet links too, and allow for uris without //
@ 2016-09-15 18:35 Mikael Magnusson
0 siblings, 0 replies; only message in thread
From: Mikael Magnusson @ 2016-09-15 18:35 UTC (permalink / raw)
To: zsh-workers
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-15 18:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15 18:35 PATCH: Handle magnet links too, and allow for uris without // Mikael Magnusson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).