added autocmd hooks for screensaver commands

added a landing page for the help command
This commit is contained in:
2026-03-21 03:06:55 -04:00
parent 42647ffda8
commit 627489905e
10 changed files with 139 additions and 78 deletions

View File

@@ -145,7 +145,20 @@ behavior without modifying the shell itself.
Special variables:
`$_COMP_CANDIDATE` the selected completion candidate
2.8 Exit Event *autocmd-exit-event*
2.8 Screensaver Events *autocmd-screensaver-events*
`on-screensaver-exec` *autocmd-on-screensaver-exec*
Fires when the screensaver activates after the idle timeout.
The screensaver command (see `shopt prompt.screensaver_cmd`) is
available for pattern matching.
`on-screensaver-return` *autocmd-on-screensaver-return*
Fires when the shell returns from the screensaver command.
The screensaver command is available for pattern matching.
2.9 Exit Event *autocmd-exit-event*
`on-exit` *autocmd-on-exit*

44
doc/help.txt Normal file
View File

@@ -0,0 +1,44 @@
*help*
#SHED HELP#
Shed is an experimental UNIX command interpreter (shell) usable as both an interactive login shell and as a shell script command preprocessor. Shed combines the functionality of `bash` with the UX and customizability of `vim`. Shed seeks to improve the interactive shell experience by providing:
* Programmable, dynamic prompts
* A hackable line editor similar to `zsh`'s `zle`
* Custom tab completion
* An event hook system
* Fuzzy history search/tab completion
* And many more features
==============================================================================
1. Available Topics *help-topics*
`help arith` Arithmetic expansion: `$(( ))` syntax |arith|
`help autocmd` Autocmd hooks for shell events |autocmd|
`help ex` Ex mode (colon) commands |ex|
`help glob` Pathname expansion and wildcards |glob|
`help keybinds` Vi mode keys, motions, text objects |keybinds|
`help param` Parameter expansion: `${}` operators |param|
`help prompt` Prompt configuration, PS1, PSR, echo -p |prompt|
`help redirect` Redirection, pipes, heredocs |redirect|
==============================================================================
2. Navigating Help *help-nav*
`help {topic}` Open a help page by name. Prefix matches work,
so `help key` opens |keybinds|.
`help {tag}` Jump directly to a tagged section. Tags are the
words marked with `*asterisks*` in the help files.
Examples:
`help text-objects` jumps to |text-objects|
`help prompt-escapes` jumps to |prompt-escapes|
`help heredoc` jumps to |heredoc|
Cross-references like |prompt| are clickable tags. Search for them
with `help` followed by the reference name.
Inside the pager, use `/` to search and `q` to quit.
==============================================================================

View File

@@ -388,7 +388,7 @@ mode on startup is Insert.
When the buffer is taller than the terminal, the editor displays a
scrolling viewport. The viewport follows the cursor and respects the
`scrolloff` option (minimum lines visible above/below the cursor).
`line.scroll_offset` shopt (minimum lines visible above/below the cursor).
`Ctrl+D` scroll down half a screen
`Ctrl+U` scroll up half a screen