[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Will diff --show-c-function behaves resonably for non C files?



On Sat, Aug 13, 2011 at 03:51:33PM -0700, Regid Ichira wrote:
> $ diff --help | grep -e --show-c-function
>     -p  --show-c-function  Show which C function each change is in.
> 
>   Will diff -p behaves reasonably when applied to non C files?
> I want to use the -p option in a script that does not necessarily act
> on C files? 

I would expect this to work on files that are similar to C (say, Java),
but probably not for files where functions are declared differently
(Python, Ada) and definitely not on files where something like a
function makes no sense (Plain text).

There's always one way to find out, though: try it.

-- 
Paul Saunders

Attachment: signature.asc
Description: Digital signature


Reply to: