GNU bug report logs - #16938
24.3.50; Support the Dash shell shebang and .[bd]sh file types

Previous Next

Package: emacs;

Reported by: John Yates <john <at> yates-sheets.org>

Date: Tue, 4 Mar 2014 18:15:03 UTC

Severity: wishlist

Found in version 24.3.50

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: John Yates <john <at> yates-sheets.org>
Subject: bug#16938: closed (Re: bug#16938: 24.3.50; Support the Dash shell
 shebang and .[bd]sh file types)
Date: Wed, 05 Mar 2014 19:00:04 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#16938: 24.3.50; Support the Dash shell shebang and .[bd]sh file types

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 16938 <at> debbugs.gnu.org.

-- 
16938: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16938
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 16938-done <at> debbugs.gnu.org
Subject: Re: bug#16938: 24.3.50;
 Support the Dash shell shebang and .[bd]sh file types
Date: Wed, 05 Mar 2014 13:59:46 -0500
Version: 24.4

Glenn Morris wrote:

>> For interpreter-mode-alist I suggest adding the follow entry:
>>
>>      ("dash" . sh-mode)

Added.

[Message part 3 (message/rfc822, inline)]
From: John Yates <john <at> yates-sheets.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Support the Dash shell shebang and .[bd]sh file types
Date: Tue, 4 Mar 2014 13:14:34 -0500
[Message part 4 (text/plain, inline)]
#!/bin/sh is interpreted inconsistently across platforms.  In the rpm
world it most often maps to /bin/bash.  In the Debian universe it maps
to /bin/dash.  Bash and dash have subtle differences that have bitten
me often enough to cause me now to use precise shebangs (#!/bin/bash or
#!/bin/dash) and to suffix my files with either .bsh or .dsh.

At present emacs' interpreter-mode-alist knows nothing about dash and
its auto-mode-alist is ignorant of both the .bsh and .dsh suffixes.

For interpreter-mode-alist I suggest adding the follow entry:

     ("dash" . sh-mode)


For auto-mode-alist I suggest changing the follow entry:

     ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)

to

     ("\\.[bcdk]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)

/john
[Message part 5 (text/html, inline)]

This bug report was last modified 11 years and 137 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.