mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-05-19 23:21:25 +02:00
52222: Document bracketed-paste-url-magic
This commit is contained in:
parent
6b34f3dc14
commit
457ab9f9fe
2 changed files with 29 additions and 0 deletions
|
@ -6,6 +6,8 @@
|
|||
* 51490: Src/Zle/computil.c: Use time_t for lastt which stores
|
||||
result of time(0)
|
||||
|
||||
* 52222: Doc/Zsh/contrib.yo: Document bracketed-paste-url-magic
|
||||
|
||||
2023-10-15 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 52218: Etc/BUGS, NEWS, README: notes since 5.9 release
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue