FollieHiyuki-dotfiles/home/.config/fish/functions/fzf-select.fish
2021-02-13 19:28:59 +03:00

8 lines
325 B
Fish

function fzf-select -d 'fzf commandline job and print unescaped selection back to commandline'
set -l cmd (commandline -j)
[ "$cmd" ]; or return
eval $cmd | eval (__fzfcmd) -m --tiebreak=index --select-1 --exit-0 | string join ' ' | read -l result
[ "$result" ]; and commandline -j -- $result
commandline -f repaint
end