Mercurial > dotfiles
comparison dot_config/private_fish/functions/fzf_last_command_output.fish @ 1038:6ab26ddbf78d
feat: add fish shell
author | Zeger Van de Vannet <zeger@vandevan.net> |
---|---|
date | Fri, 26 Apr 2024 18:43:22 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1037:38b8060cdf24 | 1038:6ab26ddbf78d |
---|---|
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 |