From 197df71e3e02d1b42f58b629999723bb5af9c974 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Tue, 18 Oct 2022 02:39:26 +0000 Subject: [PATCH] Also check if bat exists before aliasing cat. --- .shell_aliases | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.shell_aliases b/.shell_aliases index 827f655..0985b6b 100755 --- a/.shell_aliases +++ b/.shell_aliases @@ -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-) } -alias cat="bat" +if command -v bat; then + alias cat="bat" +fi export FZF_DEFAULT_COMMAND='fd --type f' alias fzf="fzf --preview 'bat --style=numbers --color=always {}'"