git grepの色はgrepのカスタム色とは異なります。

git grepの色はgrepのカスタム色とは異なります。

私のgrepの色を設定しました~/.bashrc

export GREP_COLORS='ms=01;34:mc=01;34:sl=:cx=:fn=35:ln=32:bn=32:se=36'

彼らのために

  • grep --color=auto
  • grep --color=always

残念ながら、次のカスタムカラーは無視されます。

  • git grep --color=auto
  • git grep --color=always

git grep上記の色を使用する方法は$GREP_COLORS

ベストアンサー1

Git grepは環境変数を使用しませんGREP_COLORS。代わりにカスタムアイテムを追加する必要があります。~/.gitconfig

たとえば、

[color "grep"]
    linenumber = yellow bold
    match = red
    filename = magenta     

おすすめ記事