about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2022-06-06 12:43:57 +0200
committerMikael Magnusson <mikachu@gmail.com>2023-10-17 04:54:05 +0200
commit457ab9f9fe12a093dd41a6c96bff6db209471ecc (patch)
tree1f2e5b9a84d4d068d328d9a10492471a9797098f /Doc
parent6b34f3dc14d5caf7f4e3ef0a6416224edf905c48 (diff)
downloadzsh-457ab9f9fe12a093dd41a6c96bff6db209471ecc.tar.gz
zsh-457ab9f9fe12a093dd41a6c96bff6db209471ecc.tar.xz
zsh-457ab9f9fe12a093dd41a6c96bff6db209471ecc.zip
52222: Document bracketed-paste-url-magic
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/contrib.yo27
1 files changed, 27 insertions, 0 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index ef11d77ad..f43ac2257 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -2448,6 +2448,33 @@ history is restricted, so cursor motions, etc., may not pass outside of
 the pasted content.  Text assigned to tt(BUFFER) by the active widgets
 is copied back into tt(PASTED) before tt(paste-finish).
 )
+tindex(bracketed-paste-url-magic)
+item(tt(bracketed-paste-url-magic))(
+This widget is a simpler version of using tt(bracketed-paste-magic)
+to enable tt(quote-url-magic). Rather than re-interpreting everything as
+keystrokes, it simply handles quoting of pasted urls itself, and all other
+text is handled like the default bracketed-paste widget.
+
+It limits the quoting to pastes that consist of a single url, but you
+can also enable or disable quoting explicitly for a paste by setting
+NUMERIC to 1 or 2 respectively (ie, by pressing alt-1 or alt-2 before
+pasting).
+
+It is also possible to customize the list of schemas used to
+decide if something is a url by setting the tt(schema) style in the
+tt(:bracketed-paste-url-magic) context, for example:
+ifzman()
+example(zstyle :bracketed-paste-url-magic schema http:// myspecialschema:)
+
+The default list of schemas is tt(http:// https:// ftp:// ftps:// file:// \
+                                  ssh:// sftp:// magnet:).
+
+The widget itself is installed in a similar way as
+tt(bracketed-paste-magic) above, by
+ifzman()
+example(autoload -Uz bracketed-paste-url-magic
+zle -N bracketed-paste bracketed-paste-url-magic)
+)
 tindex(copy-earlier-word)
 item(tt(copy-earlier-word))(
 This widget works like a combination of tt(insert-last-word) and