diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2016-09-15 20:13:29 +0200 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2016-09-19 00:34:13 +0200 |
commit | c3fbd97f9bf1b7fb6ec962d78761d872d570a850 (patch) | |
tree | 4e4ad4d2bca0a8ac9d2afc8ea615a4f6e3f1c0ec | |
parent | f0c804879b97190e042eba7f00bc2fcad4841e36 (diff) | |
download | zsh-c3fbd97f9bf1b7fb6ec962d78761d872d570a850.tar.gz zsh-c3fbd97f9bf1b7fb6ec962d78761d872d570a850.tar.xz zsh-c3fbd97f9bf1b7fb6ec962d78761d872d570a850.zip |
bracketed-paste-url-magic: Handle magnet links too, and allow for schemes without //
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Functions/Zle/bracketed-paste-url-magic | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index e68ed6d5d..e92c7b24d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-09-19 Mikael Magnusson <mikachu@gmail.com> + + * 39351: Functions/Zle/bracketed-paste-url-magic: Handle magnet + links too, and allow for schemes without // + 2016-09-18 Daniel Shahaf <d.s@daniel.shahaf.name> * 39374: Completion/Debian/Command/_apt: Complete package 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 |