summaryrefslogtreecommitdiff
path: root/functions/cat.fish
diff options
context:
space:
mode:
Diffstat (limited to 'functions/cat.fish')
-rw-r--r--functions/cat.fish8
1 files changed, 8 insertions, 0 deletions
diff --git a/functions/cat.fish b/functions/cat.fish
new file mode 100644
index 0000000..f58224e
--- /dev/null
+++ b/functions/cat.fish
@@ -0,0 +1,8 @@
+function cat -d "Print a file nicely"
+ if isatty stdout
+ bat $argv
+ else
+ set -l catBin $(type --no-functions --path cat)
+ $catBin $argv
+ end
+end