zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Document bracketed-paste-url-magic
@ 2023-10-16  8:38 Mikael Magnusson
  2023-10-16 22:58 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Magnusson @ 2023-10-16  8:38 UTC (permalink / raw)
  To: zsh-workers

---
 Doc/Zsh/contrib.yo | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index ef11d77ade..cb6c837033 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -2448,6 +2448,32 @@ 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-interpreted 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 same way as the 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
-- 
2.38.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: Document bracketed-paste-url-magic
  2023-10-16  8:38 PATCH: Document bracketed-paste-url-magic Mikael Magnusson
@ 2023-10-16 22:58 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2023-10-16 22:58 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: zsh-workers

On Mon, Oct 16, 2023 at 1:39 AM Mikael Magnusson <mikachu@gmail.com> wrote:
>
> +The widget itself is installed in a similar same way as the above, by

"a similar same" ... and I presume "as the above" refers to
bracketed-paste-magic?

(Plainly it's easier for me to proofread someone else's posts than my own.)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-16 22:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-16  8:38 PATCH: Document bracketed-paste-url-magic Mikael Magnusson
2023-10-16 22:58 ` Bart Schaefer

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).