Created
September 6, 2017 06:40
-
-
Save m-nakamura145/7d2184446675e9a154df34ba163b9363 to your computer and use it in GitHub Desktop.
peco_select_history.fish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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