Re: [PATCH/RFC] remove #!interpreter line from shell libraries

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

 



On 12-03-09 02:58 AM, Clemens Buchacher wrote:
> Hi Jonathan,
> 
> On Thu, Mar 08, 2012 at 06:14:04AM -0600, Jonathan Nieder wrote:
>>
>> --- a/git-mergetool--lib.sh
>> +++ b/git-mergetool--lib.sh
>> @@ -1,5 +1,4 @@
>> -#!/bin/sh
>> -# git-mergetool--lib is a library for common merge tool functions
>> +# git-mergetool--lib is a shell library for common merge tool functions
> 
> This breaks vim's filetype detection. It can still guess the file type
> from the .sh extension, but we strip the extension during the build.
> Although one should typically work with the source files, in the past I
> did have a look at the installed files on a few occasions. Maybe because
> I did not know better, or because the source code was not available to
> me. So for me, this outweighs the aesthetic advantages, if any.

(I hesitate to suggest the following, but since nobody else is replying to
this thread...)

How about a modeline?  I think the following would work for both emacs and
vi(m?) (I'm not a vi user, so I might have it wrong):

	# -*-mode:shell-script-*-   vi: filetype=sh

(Now I'll wince and duck as people "calmly" discuss the merits of putting
editor-specific modelines in the source code, and especially which editors
deserve such treatment...)

		M.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]