fld.fish: Fallback for when colordiff is missing
This commit is contained in:
parent
f60631992d
commit
428a8eaf62
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
function fld --wraps 'fossil diff'
|
||||
command fossil diff $argv -N | colordiff | less -FRX
|
||||
if type -q colordiff2
|
||||
command fossil diff -N $argv | colordiff | less -FRX
|
||||
else
|
||||
set -l red (tput setaf 1)
|
||||
set -l green (tput setaf 2)
|
||||
set -l reset (tput sgr0)
|
||||
fossil diff -N $argv | sed "s/^+.*\$/$green&$reset/" |
|
||||
sed "s/^-.*\$/$red&$reset/" | less -FRX
|
||||
end
|
||||
end
|
||||
|
|
|
@ -35,3 +35,5 @@
|
|||
|
||||
[fetch]
|
||||
fsckObjects = true
|
||||
[pull]
|
||||
ff = only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue