fish: prefer delta to diff-so-fancy, rename dsf to diff

This commit is contained in:
Charles Gould 2022-11-09 10:26:44 -05:00
parent 504926534f
commit 219f8b561e
6 changed files with 12 additions and 6 deletions

View File

@ -12,6 +12,7 @@ if status --is-interactive
# If installed, setup git tools
command -q diff-so-fancy; and set -gx GIT_PAGER "diff-so-fancy | $PAGER"
command -q delta; and set -gx GIT_PAGER 'delta --diff-so-fancy'
command -q interactive-rebase-tool; and set -gx GIT_SEQUENCE_EDITOR interactive-rebase-tool
# If installed, setup z function

9
fish/functions/diff.fish Normal file
View File

@ -0,0 +1,9 @@
function diff
if command -q delta
command diff -u $argv[1] $argv[2] | delta --diff-so-fancy
else if command -q diff-so-fancy
command diff -u $argv[1] $argv[2] | diff-so-fancy
else
command diff -u $argv[1] $argv[2]
end
end

View File

@ -1,3 +0,0 @@
function dsf
command diff -u $argv[1] $argv[2] | diff-so-fancy
end

View File

@ -3,7 +3,6 @@
useConfigOnly = true
[core]
autocrlf = input
editor = nvim
[alias]
aliases = config --get-regexp alias
branchsort = branch --sort='-committerdate' --format='%(HEAD) %(color:blue)%(committerdate:short)%(color:reset) %(if)%(worktreepath)%(then)%(color:reverse yellow)%(refname:short)%(color:reset)%(else)%(color:yellow)%(refname:short)%(color:reset)%(end) %(color:green)%(upstream:short)%(color:reset)'
@ -12,8 +11,6 @@
logsearch = log --color=always --format=tformat:'%C(blue)%cs%C(reset) %C(yellow)%h%C(reset) %C(normal)%s%C(reset)'
rbi = rebase --interactive
wipe = restore --staged --worktree
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow

View File

@ -12,6 +12,7 @@ brew install \
fish \
fzf \
git \
git-delta \
git-interactive-rebase-tool \
less \
macchina \

View File

@ -5,6 +5,7 @@
with import <nixpkgs> {}; [
bat
diff-so-fancy
delta
fd
fish
fzf