From 69df42c51bfed4ac25130751a578d6d5487c908a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 7 Feb 2024 17:09:01 +0100 Subject: [PATCH] doc: better examples for pipe-* commands --- doc/foot.ini.5.scd | 10 ++++------ foot.ini | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index 14999a8b..f184eb9a 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -858,16 +858,14 @@ e.g. *search-start=none*. use *sh -c "command line"* if you need that. Example #1: - # 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* +*pipe-visible=[sh -c "xurls | uniq | tac | fuzzel | xargs -r 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* + # Open scrollback contents in Emacs running in a new foot instance++ +*pipe-scrollback=[sh -c "f=$(mktemp) && cat - > $f && foot emacsclient -t $f; rm $f"] Control+Shift+Print* + Default: _none_ *show-urls-launch* diff --git a/foot.ini b/foot.ini index 42a71e58..9fd6c9db 100644 --- a/foot.ini +++ b/foot.ini @@ -158,7 +158,7 @@ # pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none # pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none # pipe-selected=[xargs -r firefox] none -# pipe-command-output=[sh -c "cat - > /tmp/foot-cmd-out.txt"] none # Write output of last command to /tmp/foot-cmd-out.txt (requires shell integration) +# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard # show-urls-launch=Control+Shift+o # show-urls-copy=none # show-urls-persistent=none