Feature request: detect '#!' lines

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
JRobert
Posts: 2
Joined: Mon Nov 23, 2009 10:58 am

Feature request: detect '#!' lines

Post by JRobert » Mon Nov 23, 2009 11:40 am

Terrific tool - thank you. I use it to compare unix scripts in various languages, but with suffix-less file names. It would be really useful if DiffMerge could (optionally) look for and use the shebang line:

Code: Select all

#! <path_to_interpreter>
as another way to decide which ruleset to use, in the absence of a suffix.
Also, since I run DiffMerge with a wrapper script, if there were a way pass a suffix string (eg. "-e=.awk") on the DiffMerge command line, the wrapper could select the ruleset for suffix-less files.

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Feature request: detect '#!' lines

Post by jeffhostetler » Tue Nov 24, 2009 9:13 am

Two excellent suggestions. I've been wanting to do the --suffix=".awk" for a while now.
I hadn't thought about the #! trick. I'll log both of these.

In the mean time, you can modify the "default" ruleset (which is only used when
there is no matching ruleset) to do what you want. I know it's not optimal since
it would treat a variety of different script languages the same, but it may be
helpful....

jeff

11547
15101

JRobert
Posts: 2
Joined: Mon Nov 23, 2009 10:58 am

Re: Feature request: detect '#!' lines

Post by JRobert » Sun Mar 22, 2015 1:04 pm

I've just upgraded DiffMerge for the first time since this conversation from 5 years ago (that speaks well for how solid your code is!)

Has this suggestion - to detect shebangs - ever gone any further? I don't find any references to 'shebang' or '#! in the manual.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Feature request: detect '#!' lines

Post by Beth » Mon Mar 23, 2015 10:33 am

This hasn't been coded yet. I've added a note so that the developers are aware that there still is interest in this item.

F: 15101
V: G8887
Beth Kieler
SourceGear Technical Support

Post Reply