doc: foot.ini: document pipe-command-output

This commit is contained in:
Daniel Eklöf 2022-12-08 11:50:43 +01:00
parent f2a8368759
commit 0fed2451ea
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -844,11 +844,12 @@ e.g. *search-start=none*.
*fullscreen* *fullscreen*
Toggles the fullscreen state. Default: _none_. Toggles the fullscreen state. Default: _none_.
*pipe-visible*, *pipe-scrollback*, *pipe-selected* *pipe-visible*, *pipe-scrollback*, *pipe-selected*, *pipe-command-output*
Pipes the currently visible text, the entire scrollback, or the Pipes the currently visible text, the entire scrollback, the
currently selected text to an external tool. The syntax for this currently selected text, or the last command's output to an
option is a bit special; the first part of the value is the external tool. The syntax for this option is a bit special; the
command to execute enclosed in "[]", followed by the binding(s). first part of the value is the command to execute enclosed in
"[]", followed by the binding(s).
You can configure multiple pipes as long as the command strings You can configure multiple pipes as long as the command strings
are different and the key bindings are unique. are different and the key bindings are unique.
@ -856,10 +857,17 @@ e.g. *search-start=none*.
Note that the command is *not* automatically run inside a shell; Note that the command is *not* automatically run inside a shell;
use *sh -c "command line"* if you need that. use *sh -c "command line"* if you need that.
Example: Example #1:
*pipe-visible=[sh -c "xurls | uniq | tac | fuzzel | xargs -r
# Extract currently visible URLs, let user choose one (via
fuzzel), then launch firefox with the selected URL++
*pipe-visible=[sh -c "xurls | uniq | tac | fuzzel | xargs -r
firefox"] Control+Print* firefox"] Control+Print*
Example #2:
# Write scrollback content to /tmp/foot-scrollback.txt++
*pipe-scrollback=[sh -c "cat - > /tmp/foot-scrollback.txt"]
Control+Shift+Print*
Default: _none_ Default: _none_
*show-urls-launch* *show-urls-launch*