Skip to content

Instantly share code, notes, and snippets.

@m-nakamura145
Created September 6, 2017 06:40
Show Gist options
  • Save m-nakamura145/7d2184446675e9a154df34ba163b9363 to your computer and use it in GitHub Desktop.
Save m-nakamura145/7d2184446675e9a154df34ba163b9363 to your computer and use it in GitHub Desktop.
peco_select_history.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⏎
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment