mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
bracketed-paste-url-magic: Handle magnet links too, and allow for schemes without //
This commit is contained in:
parent
f0c804879b
commit
c3fbd97f9b
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue