oh-my-fish/plugins/peco/peco_select_history.fish

16 lines
271 B
Fish
Raw Normal View History

2014-07-29 08:38:02 +00:00
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
2014-07-29 08:38:02 +00:00
if [ $foo ]
commandline $foo
else
commandline ''
end
end