Skip to content

Instantly share code, notes, and snippets.

@aluxian
Created May 24, 2020 11:37
Show Gist options
  • Save aluxian/c4b6158afeffc5b020a5a1ecb549a9fa to your computer and use it in GitHub Desktop.
Save aluxian/c4b6158afeffc5b020a5a1ecb549a9fa to your computer and use it in GitHub Desktop.
function fzf_history_reverse_search --description 'Reverse search the command history'
history -z | fzf --read0 --print0 --height 50% --tiebreak=index --bind=ctrl-r:toggle-sort --no-multi --query (commandline | string collect) | read -lz result
and commandline -- $result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment