oh-my-fish/plugins/peco/peco_select_history.fish
2015-01-16 09:01:28 +01:00

16 lines
271 B
Fish

function peco_select_history
if test (count $argv) = 0
set peco_flags --layout=bottom-up
else
set peco_flags --layout=bottom-up --query "$argv"
end
history|peco $peco_flags|read foo
if [ $foo ]
commandline $foo
else
commandline ''
end
end