path: root/Doc
diff options
authorBart Schaefer <schaefer@ipost.com>2021-05-15 13:37:35 -0700
committerBart Schaefer <schaefer@ipost.com>2021-05-15 13:37:35 -0700
commitacd20254b58ea689d8046ff127bc320d5fa91cf6 (patch)
tree94be5aa8f554076d07a91b0a650e19654883fe52 /Doc
parent3fe6bd56ed792920cac4385275b0482a63c47a0c (diff)
48710: histed + other zed updates
Diffstat (limited to 'Doc')
1 files changed, 19 insertions, 2 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index da7ab2a7c..b777703b3 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -4295,6 +4295,12 @@ Same as tt(zed -f). This function does not appear in the zsh
distribution, but can be created by linking tt(zed) to the name tt(fned)
in some directory in your tt(fpath).
+item(tt(histed) [ [ var(name) ] var(size) ])(
+Same as tt(zed -h). This function does not appear in the zsh
+distribution, but can be created by linking tt(zed) to the name tt(histed)
+in some directory in your tt(fpath).
item(tt(is-at-least) var(needed) [ var(present) ])(
Perform a greater-than-or-equal-to comparison of two strings having the
@@ -4504,6 +4510,7 @@ tt(zargs) with the tt(-)tt(-help) option.
xitem(tt(zed) [ tt(-f) [ tt(-x) var(num) ] ] var(name))
+xitem(tt(zed) [ tt(-h) [ var(name) ] var(size) ])
item(tt(zed -b))(
This function uses the ZLE editor to edit a file or function.
@@ -4518,7 +4525,14 @@ the given number of spaces; `tt(-x 2)' is consistent with the layout
of functions distributed with the shell.
Without tt(-f), var(name) is the path name of the file to edit, which need
-not exist; it is created on write, if necessary.
+not exist; it is created on write, if necessary. With tt(-h), the file is
+presumed to contain history events.
+When no file name is provided for tt(-h) the current shell history is edited
+in place. The history is renumbered when zed exits successfully.
+When editing history, multi-line events must have a trailing backslash on
+every line before the last.
While editing, the function sets the main keymap to tt(zed) and the
vi command keymap to tt(zed-vicmd). These will be copied from the existing
@@ -4544,7 +4558,10 @@ bound to a key in either of the tt(zed) or tt(zed-vicmd) keymaps after
a new name for the file being edited. When zed exits the file will be
written under that name and the original file will be left alone. The
widget has no effect when invoked from `tt(zed -f)'. The completion
-context is changed to `tt(:completion:zed-set-file-name:)'.
+context is changed to `tt(:completion:zed-set-file-name:)'. When editing
+the current history with `tt(zed -h)', the history is first updated and
+then the file is written, but the global setting of tt(HISTFILE) is not
While tt(zed-set-file-name) is running, zed uses the keymap
tt(zed-normal-keymap), which is linked from the main keymap in effect