summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorache <ache@ache.one>2025-07-17 04:00:14 +0200
committerache <ache@ache.one>2025-07-17 04:00:14 +0200
commit4f496904430c06f6462bf4a50fcda5e41524e7cd (patch)
treed3f3e7e26b9ed76db746299f7a6c3dbfc40a764b /functions
parentUpdate fish config (diff)
Fix bat not installed
Diffstat (limited to 'functions')
-rw-r--r--functions/cat.fish12
1 files changed, 7 insertions, 5 deletions
diff --git a/functions/cat.fish b/functions/cat.fish
index f58224e..5536e8a 100644
--- a/functions/cat.fish
+++ b/functions/cat.fish
@@ -1,8 +1,10 @@
function cat -d "Print a file nicely"
- if isatty stdout
- bat $argv
- else
- set -l catBin $(type --no-functions --path cat)
- $catBin $argv
+ if type -q bat
+ if isatty stdout
+ bat $argv
+ else
+ set -l catBin $(type --no-functions --path cat)
+ $catBin $argv
+ end
end
end