fzfでhistoryを検索する
https://github.com/PatrickF1/fzf.fish?tab=readme-ov-file を使えばいい
hr.icon
以下は古い
code:fish
function fzf_select_history
if test (count $argv) > 0
set fzf_flags -q "$argv"
end
history -z | fzf --read0 $fzf_flags | perl -pe 'chomp if eof' | read -lz result
if test -n "result"
commandline "$result"
else
commandline ''
end
end
複数行に対応している
https://github.com/junegunn/fzf/pull/954/files を参考にした