Also check if bat exists before aliasing cat.
This commit is contained in:
parent
8032e27573
commit
197df71e3e
|
@ -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-)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if command -v bat; then
|
||||||
alias cat="bat"
|
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 {}'"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue