What grep command will include the current function name in its output?

前端 未结 9 2066
夕颜
夕颜 2021-01-07 18:08

I run diff with the -p option so the output will include the name of the function where each change occurred. Is there an analogous option for

9条回答
  •  礼貌的吻别
    2021-01-07 18:22

    There is no such function in GNU grep, although it has been discussed in the past.

    However if your code is under git's control, git grep has an option -p that will do that.

提交回复
热议问题