FollieHiyuki-dotfiles/home/.config/fish/functions/fzf-select.fish

8 lines
325 B
Fish
Raw Normal View History

2021-02-13 11:28:59 -05:00
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