diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/foot-ctlseqs.7.scd | 3 | ||||
| -rw-r--r-- | doc/foot.1.scd | 39 | ||||
| -rw-r--r-- | doc/foot.ini.5.scd | 8 |
3 files changed, 50 insertions, 0 deletions
diff --git a/doc/foot-ctlseqs.7.scd b/doc/foot-ctlseqs.7.scd index 2759b625..1d94219f 100644 --- a/doc/foot-ctlseqs.7.scd +++ b/doc/foot-ctlseqs.7.scd @@ -677,6 +677,9 @@ All _OSC_ sequences begin with *\\E]*, sometimes abbreviated _OSC_. | \\E] 119 \\E\\ : xterm : Reset selection foreground color +| \\E] 133 ; A \\E\\ +: FinalTerm +: Mark start of shell prompt | \\E] 555 \\E\\ : foot : Flash the entire terminal (foot extension) diff --git a/doc/foot.1.scd b/doc/foot.1.scd index 6f0ad6db..afb8faf5 100644 --- a/doc/foot.1.scd +++ b/doc/foot.1.scd @@ -205,6 +205,13 @@ default) available; see *foot.ini*(5). *ctrl*+*shift*+*u* Activate URL mode, allowing you to "launch" URLs. +*ctrl*+*shift*+*z* + Jump to the previous, currently not visible, prompt. Requires + shell integration. + +*ctrl*+*shift*+*x* + Jump to the next prompt. Requires shell integration. + ## SCROLLBACK SEARCH *ctrl*+*r* @@ -370,6 +377,38 @@ commented out will usually be installed to */etc/xdg/foot/foot.ini*. For more information, see *foot.ini*(5). +# SHELL INTEGRATION + +## Current working directory + +New foot terminal instances (bound to *ctrl*+*shift*+*n* by default) +will open in the current working directory, if the shell in the +“parent” terminal reports directory changes. + +This is done with the OSC-7 escape sequence. Most shells can be +scripted to do this, if they do not support it natively. See the wiki +(https://codeberg.org/dnkl/foot/wiki#user-content-spawning-new-terminal-instances-in-the-current-working-directory) +for details. + + +## Jumping between prompts + +Foot can move the current viewport to focus prompts of already +executed commands (bound to *ctrl*+*shift*+*z*/*x* by default). + +For this to work, the shell needs to emit an OSC-133;A +(*\\E]133;A\\E\\\\*) sequence before each prompt. + +In zsh, one way to do this is to add a _precmd_ hook: + + *precmd() { + print -Pn "\\e]133;A\\e\\\\" + }* + +See the wiki +(https://codeberg.org/dnkl/foot/wiki#user-content-jumping-between-prompts) +for details, and examples for other shells. + # TERMINFO Client applications use the terminfo identifier specified by the diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index bc1b6bdd..bd551442 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -773,6 +773,14 @@ e.g. *search-start=none*. jump label with a key sequence that will place the URL in the clipboard. Default: _none_. +*prompt-prev* + Jump to the previous, currently not visible, prompt (requires + shell integration, see *foot*(1)). Default: _Control+Shift+z_. + +*prompt-next* + Jump the next prompt (requires shell integration, see + *foot*(1)). Default: _Control+Shift+x_. + # SECTION: search-bindings This section lets you override the default key bindings used in |
