Also use comma as a word separator in diff

后端 未结 3 1294
生来不讨喜
生来不讨喜 2021-02-02 08:08

How can I add , as a word separator for git diff --word-diff?

For instance I would like the diff to recognize that

function(A,B,C) -> fun         


        
3条回答
  •  青春惊慌失措
    2021-02-02 08:46

    In addition to KurzedMetal's answer: without the quotes it works even better since it doesn't break my bashs autocompletion when hitting TAB.

    git diff --word-diff-regex=[^[:space:],]+

提交回复
热议问题