about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2015-06-19 00:15:38 +0200
committerOliver Kiddle <opk@zsh.org>2015-06-19 00:15:38 +0200
commit98687fa1dec803f041cbb5417c146d8aa5129b53 (patch)
treee62c09baa6ea0717677e7bad7adf3a64423cba5a /Doc
parent0a0ba5e6641a8a78d745928e5738c95cc5353ee0 (diff)
downloadzsh-98687fa1dec803f041cbb5417c146d8aa5129b53.tar.gz
zsh-98687fa1dec803f041cbb5417c146d8aa5129b53.tar.xz
zsh-98687fa1dec803f041cbb5417c146d8aa5129b53.zip
35474, 35492: support the bracketed paste mode of newer terminal emulators
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/params.yo17
-rw-r--r--Doc/Zsh/zle.yo12
2 files changed, 29 insertions, 0 deletions
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index eb3eb367e..e2091624b 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -1642,6 +1642,23 @@ item(tt(ZDOTDIR))(
 The directory to search for shell startup files (.zshrc, etc),
 if not tt($HOME).
 )
+vindex(zle_bracketed_paste)
+cindex(bracketed paste)
+cindex(enabling bracketed paste)
+item(tt(zle_bracketed_paste))(
+Many terminal emulators have a feature that allows applications to
+identify when text is pasted into the terminal rather than being typed
+normally. For ZLE, this means that special characters such as tabs
+and newlines can be inserted instead of invoking editor commands.
+Furthermore, pasted text forms a single undo event and if the region is
+active, pasted text will replace the region.
+
+This two-element array contains the terminal escape sequences for
+enabling and disabling the feature. These escape sequences are used to
+enable bracketed paste when ZLE is active and disable it at other times.
+Unsetting the parameter has the effect of ensuring that bracketed paste
+remains disabled.
+)
 vindex(ZLE_LINE_ABORTED)
 item(tt(ZLE_LINE_ABORTED))(
 This parameter is set by the line editor when an error occurs.  It
diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index a89f566c3..d3f067031 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -2059,6 +2059,18 @@ tindex(beep)
 item(tt(beep))(
 Beep, unless the tt(BEEP) option is unset.
 )
+tindex(bracketed-paste)
+item(tt(bracketed-paste))(
+This widget is invoked when text is pasted to the terminal emulator. It
+is not intended to be bound to actual keys but instead to the special
+sequence generated by the terminal emulator when text is pasted.
+If a numeric argument is given, shell quoting will be applied to the
+pasted text before it is inserted. When called from a widget function,
+an argument can be given to specify a variable to which pasted text is
+assigned.
+
+See also the tt(zle_bracketed_paste) parameter.
+)
 tindex(vi-cmd-mode)
 item(tt(vi-cmd-mode) (tt(^X^V)) (unbound) (tt(^[)))(
 Enter command mode; that is, select the `tt(vicmd)' keymap.