From f0e7282ef67be5dc8063aa5b3c320467d1aa09f5 Mon Sep 17 00:00:00 2001 From: hedy Date: Thu, 28 Sep 2023 09:29:07 +0800 Subject: [PATCH] Fish: Selectively use bat for cat & Select default theme --- .config/fish/functions/cat.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/fish/functions/cat.fish b/.config/fish/functions/cat.fish index 141974a..41a0453 100644 --- a/.config/fish/functions/cat.fish +++ b/.config/fish/functions/cat.fish @@ -1,5 +1,7 @@ -function cat --wraps=ccat --description 'alias cat=ccat' - if command -sq ccat +function cat --description 'alias cat to bat, ccat, or cat' + if command -sq bat + bat --theme Dracula $argv; + else if command -sq ccat ccat $argv; else set catpath (which cat)