--- a/some/path/to/file.c
+++ b/some/path/to/file.c
I often cmd-click in iTerm to open a file in an editor, but this doesn't work here because of the a/ and b/ prefixes. Any way to make Git format the file name better? I don't even need two lines here.Delta: A syntax-highlighting pager for Git, diff, grep, and blame output
51–60 of 98 posts
Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output
#52i knew git could use arbitrary diff filter but never realised it was this simple to use. This looks very nice. The related? project "bat" also looks interesting.
If you are getting to check out bat, you might want to check, - rg (ripgrep): A grep replacement - sk (skim): A grep/fzf/fzy replacement - fd: A find replacement that's .gitignore+.ignore aware. - eza: A replacement for ls that's git aware - broot: A TUI file finder to browse large directories - yazi: A file manager (I haven't used this one too much) sk+rg + gawk in action to find files matching some text, sk \ --ans…
I've been using eza (and exa before it) for a long time, but only for the pretty and colored output. I didn't even know about the git support! I now added the --git flag to my alias and will try it out. Thank you!
Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output
#53Speaking of diffs, one thing that annoys me about Git's diff output is that is prints file paths like Unix diff traditionally does, starting with the two file names: --- a/some/path/to/file.c +++ b/some/path/to/file.c I often cmd-click in iTerm to open a file in an editor, but this doesn't work here because of the a/ and b/ prefixes. Any way to make Git format the file name better? I don't even need two lines here.
Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output
#54Speaking of diffs, one thing that annoys me about Git's diff output is that is prints file paths like Unix diff traditionally does, starting with the two file names: --- a/some/path/to/file.c +++ b/some/path/to/file.c I often cmd-click in iTerm to open a file in an editor, but this doesn't work here because of the a/ and b/ prefixes. Any way to make Git format the file name better? I don't even need two lines here.
git config --global diff.noprefix true
Checkout the manual for more prefix options.Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output
#55Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output
#56Not as fancy, but if you want halfway reasonable word-level diffs with just standard issue git, this is often good enough: git diff --color-words --word-diff-regex='\w+|.'
Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output
#57Speaking of diffs, one thing that annoys me about Git's diff output is that is prints file paths like Unix diff traditionally does, starting with the two file names: --- a/some/path/to/file.c +++ b/some/path/to/file.c I often cmd-click in iTerm to open a file in an editor, but this doesn't work here because of the a/ and b/ prefixes. Any way to make Git format the file name better? I don't even need two lines here.
Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output
#58Not as fancy, but if you want halfway reasonable word-level diffs with just standard issue git, this is often good enough: git diff --color-words --word-diff-regex='\w+|.'
How do I enable this by default (in .gitconfig)?
git config --global diff.colorWords true
git config --global diff.wordRegex '\w+|.'
Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output
#59I'm still on diff-so-fancy; Worth investigating this one?
Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output
#60We have non technical people looking at markdown PRs and commits in github and the diff viewer is terrible. It will highlight and entire paragraph because someone removed a trailing space. I use git-so-fancy locally which makes it much easier to see changes but I can't expect non-technical editors to move from their GitHub based workflow to a terminal based one