Last active
July 23, 2020 05:54
-
-
Save palaniraja/acc542c3a7eac01476e4a47f340d2b1c to your computer and use it in GitHub Desktop.
fzf - to search history
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
fh() { | |
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac --height "40%" | sed -E 's/ *[0-9]*\*? *//' | sed -E 's/\\/\\\\/g') | |
} | |
# and try fh to filter the history with fzf | |
# source: https://armno.in.th/2020/01/16/fzf-history/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment