dandavison / delta

A syntax-highlighting pager for git, diff, grep, and blame output
https://dandavison.github.io/delta/
MIT License
21.32k stars 358 forks source link

`git grep -l` replaces first `-` with a `:` #1674

Open JensRantil opened 2 months ago

JensRantil commented 2 months ago

To reproduce:

  1. Enable Delta in gitconfig.
  2. Find some content in a file that has a - in it's filename or path.
  3. Execute git grep -l "<the-content>".
  4. Notice that the first - is replaced with a :.

Expected: That it is not replaced.

Version:

$ delta --version
delta 0.17.0
jmcfarlane commented 1 month ago

Same behavior even without -l. Am currently using 0.16.5. For example:

$ echo abcdefg > test-file
$ git add test-file       
$ git grep abcdefg        
test:file:abcdefg
$ 
$ delta --version
delta 0.16.5
$