mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-30 05:40:58 +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
|
|
@ -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…
Add table
Add a link
Reference in a new issue