mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-27 18:59:40 +08:00
16 lines
271 B
Fish
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
|