Also check if bat exists before aliasing cat.

This commit is contained in:
Sage Vaillancourt 2022-10-18 02:39:26 +00:00
parent 8032e27573
commit 197df71e3e
1 changed files with 3 additions and 1 deletions

View File

@ -22,7 +22,9 @@ function ww {
ws $(rg --no-line-number --no-filename . ~/wiki | sed 's/[^a-zA-Z0-9]\+/\n/g' | grep -v "^$" | sort -f | uniq -ci | sort -hr | fzf -i | cut -c 9-) ws $(rg --no-line-number --no-filename . ~/wiki | sed 's/[^a-zA-Z0-9]\+/\n/g' | grep -v "^$" | sort -f | uniq -ci | sort -hr | fzf -i | cut -c 9-)
} }
alias cat="bat" if command -v bat; then
alias cat="bat"
fi
export FZF_DEFAULT_COMMAND='fd --type f' export FZF_DEFAULT_COMMAND='fd --type f'
alias fzf="fzf --preview 'bat --style=numbers --color=always {}'" alias fzf="fzf --preview 'bat --style=numbers --color=always {}'"