annotate dot_config/private_fish/functions/fzf_last_command_output.fish @ 1091:a1fab5298ef6
draft tip
feat: update to bitwarden 25.3 and enable ssh-agent
author |
Zeger Van de Vannet <zeger@vandevan.net> |
date |
Mon, 21 Apr 2025 20:13:02 +0200 |
parents |
6ab26ddbf78d |
children |
|
rev |
line source |
1038
|
1 function fzf_last_command_output
|
|
2 set cmd (history | fzf --header "Choose the command to rerun.")
|
|
3 if test -n "$cmd"
|
|
4 set result (eval $cmd | fzf -m --header "Choose the line(s) from the repeated command\'s output to paste into the current command-line. (The order matters!)")
|
|
5 if test -n "$result"
|
|
6 commandline -i (string join " " -- $result "") # adds a space after the inserted line output
|
|
7 end
|
|
8 end
|
|
9 commandline -f repaint
|
|
10 end
|