From unknown Sun Jun 22 07:59:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16938: 24.3.50; Support the Dash shell shebang and .[bd]sh file types Resent-From: John Yates Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Mar 2014 18:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16938 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 16938@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139395688810186 (code B ref -1); Tue, 04 Mar 2014 18:15:03 +0000 Received: (at submit) by debbugs.gnu.org; 4 Mar 2014 18:14:48 +0000 Received: from localhost ([127.0.0.1]:50606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKtrb-0002eD-Hd for submit@debbugs.gnu.org; Tue, 04 Mar 2014 13:14:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48668) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKtrZ-0002e1-86 for submit@debbugs.gnu.org; Tue, 04 Mar 2014 13:14:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKtrY-000126-06 for submit@debbugs.gnu.org; Tue, 04 Mar 2014 13:14:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKtrX-000122-SF for submit@debbugs.gnu.org; Tue, 04 Mar 2014 13:14:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKtrP-0007Fn-R4 for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 13:14:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKtrP-0000x9-2k for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 13:14:35 -0500 Received: from mail-yh0-x230.google.com ([2607:f8b0:4002:c01::230]:59592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKtrO-0000x1-Ur for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 13:14:35 -0500 Received: by mail-yh0-f48.google.com with SMTP id z6so5221359yhz.7 for ; Tue, 04 Mar 2014 10:14:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=yIEZcsTJFbpBWT+zsxoXHRl+1Si2LrIqaTVZJrn92Pg=; b=zz2/3zhQ2f3HS8uThC4fn2vaEj/CJu9M1YyBA8S0PQmAbN+/wUGzu9JIXHRA2ZVbXa QBSM1DPAc/shZTF1+j79Q98vGq5XALtYb32nd0CfyFf76Uu4FKrX4BKYzkJfia+KnBY+ Klm5s5GEGTVu85XJtYngvTLQzqFIXy2JBNvbWx/J1zjotReY09jItOlxx9y6G/aDI7g5 CvlDW7UUQWkf4gMOxaBZHCwR/MvYf84JmaNJLpVJswfIpnU+Khz7pU3C49l1ttYsAUH+ dakhP5FImpJ8qLdHZdXqN4jWC2a+P/ex+ftY/R/eZFeYr0+zeGU9yrqrIqovCLTagVJS VcSQ== MIME-Version: 1.0 X-Received: by 10.236.45.69 with SMTP id o45mr1198122yhb.64.1393956874255; Tue, 04 Mar 2014 10:14:34 -0800 (PST) Received: by 10.170.46.138 with HTTP; Tue, 4 Mar 2014 10:14:34 -0800 (PST) Date: Tue, 4 Mar 2014 13:14:34 -0500 X-Google-Sender-Auth: APXM4NkONwEuWGKr5siBHretvP8 Message-ID: From: John Yates Content-Type: multipart/alternative; boundary=089e013a284c5281ac04f3cbe0fa X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e013a284c5281ac04f3cbe0fa Content-Type: text/plain; charset=ISO-8859-1 #!/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 --089e013a284c5281ac04f3cbe0fa Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
#!/bin/sh is interpreted inconsistently across platfo= rms. =A0In the rpm
world it most often maps to /bin/bash. =A0In t= he Debian universe it maps
to /bin/dash. =A0Bash and dash have su= btle differences that have bitten
me often enough to cause me now to use precise shebangs (#!/bin/bash o= r
#!/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:

=A0 =A0 =A0("dash" . sh-mo= de)


For auto-mode-alist I suggest changing t= he follow entry:

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

<= /div>
to

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

/john
--089e013a284c5281ac04f3cbe0fa-- From unknown Sun Jun 22 07:59:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16938: 24.3.50; Support the Dash shell shebang and .[bd]sh file types In-Reply-To: Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Mar 2014 02:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16938 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: John Yates Cc: 16938@debbugs.gnu.org Received: via spool by 16938-submit@debbugs.gnu.org id=B16938.13939876589330 (code B ref 16938); Wed, 05 Mar 2014 02:48:02 +0000 Received: (at 16938) by debbugs.gnu.org; 5 Mar 2014 02:47:38 +0000 Received: from localhost ([127.0.0.1]:50936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WL1ru-0002QQ-Cu for submit@debbugs.gnu.org; Tue, 04 Mar 2014 21:47:38 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:55121) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WL1rs-0002QI-Vv for 16938@debbugs.gnu.org; Tue, 04 Mar 2014 21:47:37 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1WL1rr-0000Wj-T9; Tue, 04 Mar 2014 21:47:35 -0500 From: Glenn Morris References: X-Spook: Albanian CISU AVN Ortega Albania HAMASMOIS Lon Horiuchi X-Ran: REPy9qgyIs{fA-x(Nhuw~=yQ%~#gWOk{$:I*|1]='c$MA-TGnQsb#jTBEdR%0~;<*CIox+ X-Hue: cyan X-Attribution: GM Date: Tue, 04 Mar 2014 21:47:35 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) John Yates wrote: > For interpreter-mode-alist I suggest adding the follow entry: > > ("dash" . sh-mode) Sounds good. > 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) I've never come across .bsh and .dsh used as extensions in this way. I find zero examples on two random RHEL6, Debian testing machines. The only .bsh files are LibreOffice components that are not bash scripts. So this seems like something for your personal .emacs. From unknown Sun Jun 22 07:59:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16938: 24.3.50; Support the Dash shell shebang and .[bd]sh file types Resent-From: John Yates Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Mar 2014 13:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16938 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: 16938@debbugs.gnu.org Received: via spool by 16938-submit@debbugs.gnu.org id=B16938.139402566823006 (code B ref 16938); Wed, 05 Mar 2014 13:22:02 +0000 Received: (at 16938) by debbugs.gnu.org; 5 Mar 2014 13:21:08 +0000 Received: from localhost ([127.0.0.1]:51158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WLBkx-0005yz-TG for submit@debbugs.gnu.org; Wed, 05 Mar 2014 08:21:08 -0500 Received: from mail-yk0-f177.google.com ([209.85.160.177]:62543) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WLBku-0005yq-TV for 16938@debbugs.gnu.org; Wed, 05 Mar 2014 08:21:05 -0500 Received: by mail-yk0-f177.google.com with SMTP id q200so2624502ykb.8 for <16938@debbugs.gnu.org>; Wed, 05 Mar 2014 05:21:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=fUFKLB9gmm96DFkzYPQs3JvjZ7iQiycNVEUooo26LQA=; b=mVcQvJMyk6X/oWPGMdmTOJwyhstVLRT7q4P5Q7hfos942LsNuon3004O+S0k3wxVEv /CYy7dKVUZ0RvxsMgVsEP8fsiSILM9fHohBMAEo/KnS2Fa+cHBTcwnLj1eizB0bM3uH7 mDJFZS4A0Q88vVzU1t0M1OxR/UJ11AKzo2y4WTvDldZoTNv/twJb0CuFsPcO0tHpodsK GcinhGM8ZQ2/WY6J/EvqA1+W0vITBogRFvh7QaOivex5fJEjW16R5teKBuqMychnZ5yC jYfYg08KNc8nzx0JqXmwkrSEJGBKGucN9zPHN+eJ83PrW1i71Eqm+G+4q/KSnDdtAi1y L2dA== MIME-Version: 1.0 X-Received: by 10.236.135.15 with SMTP id t15mr6665291yhi.35.1394025664030; Wed, 05 Mar 2014 05:21:04 -0800 (PST) Received: by 10.170.46.138 with HTTP; Wed, 5 Mar 2014 05:21:03 -0800 (PST) In-Reply-To: References: Date: Wed, 5 Mar 2014 08:21:03 -0500 X-Google-Sender-Auth: l669IyTxEOisFMLGrdN14q3ScAA Message-ID: From: John Yates Content-Type: multipart/alternative; boundary=14dae9d7c1f0832c1404f3dbe413 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --14dae9d7c1f0832c1404f3dbe413 Content-Type: text/plain; charset=ISO-8859-1 Hi Glenn, Thanks for the quick reply. On Tue, Mar 4, 2014 at 9:47 PM, Glenn Morris wrote: > > ("dash" . sh-mode) > > Sounds good. > That's the one that really matters to me as many (most?) of my scripts have no file extension. I've never come across .bsh and .dsh used as extensions in this way. > I find zero examples on two random RHEL6, Debian testing machines. > The only .bsh files are LibreOffice components that are not bash scripts. > So this seems like something for your personal .emacs. > I guess I suggested .bsh and .dsh for completeness. My first encounter with .bsh was on my newest job. I introduced .dsh once I started using a #!/bin/dash shebang. Given that you found a LibreOffice conflict I am happy to withdraw my suggestion. /john --14dae9d7c1f0832c1404f3dbe413 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi G= lenn,

= Thanks for the quick reply.

On Tue, Mar 4, 2014 at 9:47 PM, Glenn Morris <rgm@gnu.org> wrote:=
> =A0 =A0 =A0("dash" . sh-mode)

Sounds good.

That's the one that re= ally matters to me as many (most?) of my scripts have no file extension.

I've never come across .bsh and .dsh used as extensions in this way. I find zero examples on two random RHEL6, Debian testing machines.
The only .bsh files are LibreOffice components that are not bash scripts. So this seems like something for your personal .emacs.

I guess I suggested .bsh and .dsh for completeness. =A0My f= irst encounter with .bsh was on my newest job. =A0I introduced .dsh once I = started using a #!/bin/dash shebang. =A0Given that you found a LibreOffice = conflict I am happy to withdraw my suggestion.

/john
--14dae9d7c1f0832c1404f3dbe413-- From unknown Sun Jun 22 07:59:25 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: John Yates Subject: bug#16938: closed (Re: bug#16938: 24.3.50; Support the Dash shell shebang and .[bd]sh file types) Message-ID: References: <03txbcii8t.fsf@fencepost.gnu.org> X-Gnu-PR-Message: they-closed 16938 X-Gnu-PR-Package: emacs Reply-To: 16938@debbugs.gnu.org Date: Wed, 05 Mar 2014 19:00:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1394046004-28515-1" This is a multi-part message in MIME format... ------------=_1394046004-28515-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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@debbugs.gnu.org. --=20 16938: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D16938 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1394046004-28515-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 16938-done) by debbugs.gnu.org; 5 Mar 2014 18:59:51 +0000 Received: from localhost ([127.0.0.1]:51943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WLH2k-0007PB-8j for submit@debbugs.gnu.org; Wed, 05 Mar 2014 13:59:50 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:45144) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WLH2i-0007P4-Lz for 16938-done@debbugs.gnu.org; Wed, 05 Mar 2014 13:59:48 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1WLH2g-0001tx-TN; Wed, 05 Mar 2014 13:59:46 -0500 From: Glenn Morris To: 16938-done@debbugs.gnu.org Subject: Re: bug#16938: 24.3.50; Support the Dash shell shebang and .[bd]sh file types References: X-Spook: United Nations mania UFO unclassified Ortega Aladdin X-Ran: ak@89(!_G)NNE#`{/(Z0~]"1hI6*&Cg))FOVnNR9vSZijFMI^:F]'&is!o& (Glenn Morris's message of "Tue, 04 Mar 2014 21:47:35 -0500") Message-ID: <03txbcii8t.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 16938-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Version: 24.4 Glenn Morris wrote: >> For interpreter-mode-alist I suggest adding the follow entry: >> >> ("dash" . sh-mode) Added. ------------=_1394046004-28515-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 4 Mar 2014 18:14:48 +0000 Received: from localhost ([127.0.0.1]:50606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKtrb-0002eD-Hd for submit@debbugs.gnu.org; Tue, 04 Mar 2014 13:14:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48668) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKtrZ-0002e1-86 for submit@debbugs.gnu.org; Tue, 04 Mar 2014 13:14:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKtrY-000126-06 for submit@debbugs.gnu.org; Tue, 04 Mar 2014 13:14:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKtrX-000122-SF for submit@debbugs.gnu.org; Tue, 04 Mar 2014 13:14:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKtrP-0007Fn-R4 for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 13:14:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKtrP-0000x9-2k for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 13:14:35 -0500 Received: from mail-yh0-x230.google.com ([2607:f8b0:4002:c01::230]:59592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKtrO-0000x1-Ur for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 13:14:35 -0500 Received: by mail-yh0-f48.google.com with SMTP id z6so5221359yhz.7 for ; Tue, 04 Mar 2014 10:14:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=yIEZcsTJFbpBWT+zsxoXHRl+1Si2LrIqaTVZJrn92Pg=; b=zz2/3zhQ2f3HS8uThC4fn2vaEj/CJu9M1YyBA8S0PQmAbN+/wUGzu9JIXHRA2ZVbXa QBSM1DPAc/shZTF1+j79Q98vGq5XALtYb32nd0CfyFf76Uu4FKrX4BKYzkJfia+KnBY+ Klm5s5GEGTVu85XJtYngvTLQzqFIXy2JBNvbWx/J1zjotReY09jItOlxx9y6G/aDI7g5 CvlDW7UUQWkf4gMOxaBZHCwR/MvYf84JmaNJLpVJswfIpnU+Khz7pU3C49l1ttYsAUH+ dakhP5FImpJ8qLdHZdXqN4jWC2a+P/ex+ftY/R/eZFeYr0+zeGU9yrqrIqovCLTagVJS VcSQ== MIME-Version: 1.0 X-Received: by 10.236.45.69 with SMTP id o45mr1198122yhb.64.1393956874255; Tue, 04 Mar 2014 10:14:34 -0800 (PST) Received: by 10.170.46.138 with HTTP; Tue, 4 Mar 2014 10:14:34 -0800 (PST) Date: Tue, 4 Mar 2014 13:14:34 -0500 X-Google-Sender-Auth: APXM4NkONwEuWGKr5siBHretvP8 Message-ID: Subject: 24.3.50; Support the Dash shell shebang and .[bd]sh file types From: John Yates To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=089e013a284c5281ac04f3cbe0fa X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e013a284c5281ac04f3cbe0fa Content-Type: text/plain; charset=ISO-8859-1 #!/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 --089e013a284c5281ac04f3cbe0fa Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
#!/bin/sh is interpreted inconsistently across platfo= rms. =A0In the rpm
world it most often maps to /bin/bash. =A0In t= he Debian universe it maps
to /bin/dash. =A0Bash and dash have su= btle differences that have bitten
me often enough to cause me now to use precise shebangs (#!/bin/bash o= r
#!/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:

=A0 =A0 =A0("dash" . sh-mo= de)


For auto-mode-alist I suggest changing t= he follow entry:

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

<= /div>
to

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

/john
--089e013a284c5281ac04f3cbe0fa-- ------------=_1394046004-28515-1--