mirror of
https://github.com/pnx/dotfiles
synced 2026-06-18 12:00:02 +02:00
fish/functions: add fallback options if non-standard commands does not exist.
This commit is contained in:
parent
a834fa9efd
commit
f66093b0ef
4 changed files with 24 additions and 9 deletions
|
|
@ -1,4 +1,7 @@
|
|||
function cat --wraps='bat -pn' --wraps='bat -pn --pager=never' --description 'alias cat bat -pn --pager=never'
|
||||
bat -pn --pager=never $argv
|
||||
|
||||
function cat
|
||||
if test -f /usr/bin/bat
|
||||
/usr/bin/bat -p --pager=never $argv
|
||||
else
|
||||
/bin/cat $argv
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue