Feature request: detect '#!' lines

Support for our DiffMerge utility.

Moderator: SourceGear

Posts: 2
Joined: Mon Nov 23, 2009 10:58 am
PostPosted: 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.

Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
PostPosted: 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



Posts: 2
Joined: Mon Nov 23, 2009 10:58 am
PostPosted: 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.

Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
PostPosted: 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

Return to Support (DiffMerge)

Who is online

Users browsing this forum: No registered users and 3 guests