fuz-git/fuz-aliases
2025-02-22 14:25:27 +02:00

8 lines
390 B
Text

fif() {
if [ ! "$#" -gt 0 ]; then echo "Need a string to search for!"; return 1; fi
rg --files-with-matches --no-messages "$1" | fzf --preview "highlight -O ansi -l {} 2> /dev/null | rg --colors 'match:bg:yellow' --ignore-case --pretty --context 10 '$1' || rg --ignore-case --pretty --context 10 '$1' {}"
}
alias fz='fuz --sorttime'
alias fze='fuz --edit'
alias fzd='fuz --dir-search'