Update .config/fish/conf.d/30-bat.fish
This commit is contained in:
parent
401293bb1d
commit
bf55ef2a1a
1 changed files with 7 additions and 2 deletions
|
@ -1,14 +1,19 @@
|
||||||
#!/usr/bin/env fish
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
set -gx BATDIFF_USE_DELTA true
|
set -gx BATDIFF_USE_DELTA true
|
||||||
|
|
||||||
set -g batcmd
|
set -g batcmd
|
||||||
|
|
||||||
|
if command -v bat &>/dev/null
|
||||||
|
set batcmd bat
|
||||||
|
else if command -v batcat &>/dev/null
|
||||||
|
set batcmd batcat
|
||||||
|
end
|
||||||
|
|
||||||
function cat --wraps bat
|
function cat --wraps bat
|
||||||
if command -v bat &>/dev/null
|
if command -v bat &>/dev/null
|
||||||
set -g batcmd bat
|
|
||||||
bat $argv
|
bat $argv
|
||||||
else if command -v batcat &>/dev/null
|
else if command -v batcat &>/dev/null
|
||||||
set -g batcmd batcat
|
|
||||||
batcat $argv
|
batcat $argv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue