Fish: Selectively use bat for cat & Select default theme

This commit is contained in:
hedy 2023-09-28 09:29:07 +08:00
parent b6162bfea4
commit f0e7282ef6
Signed by: hedy
GPG Key ID: B51B5A8D1B176372
1 changed files with 4 additions and 2 deletions

View File

@ -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)