From unknown Fri Jun 20 07:19:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54727: Recognize .bashrc as bash Resent-From: Davide Masserut Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Apr 2022 15:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54727 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 54727@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16491708165825 (code B ref -1); Tue, 05 Apr 2022 15:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Apr 2022 15:00:16 +0000 Received: from localhost ([127.0.0.1]:55810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbkfI-0001Vt-6H for submit@debbugs.gnu.org; Tue, 05 Apr 2022 11:00:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:34478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbkfG-0001Vm-OH for submit@debbugs.gnu.org; Tue, 05 Apr 2022 11:00:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbkfG-0007tA-GF for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 11:00:14 -0400 Received: from out1.migadu.com ([2001:41d0:2:863f::]:39124) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbkfD-0007lw-SF for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 11:00:14 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mssdvd.com; s=key1; t=1649170806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=ONlCu5e9KgQSOvkWa1TGNfPfFUoOuhmhAt7dCPke/rs=; b=rtBugwbtYZglOxWTikGjNsH9ydgQIDcJ82wT6IrYg/N7tjxctUeohKoHL0xbKMLJRqssbn HOrel/vlaQ48ar723kqrNwm/MHFArJCMu/o84aNbYUGJAXHgkPXszSQt858ipXO23WNVKn 5ThMVczEoGWY9vGqMw6LpolKYEaaUbM5k6gDgYXfF7u0GvTNb1hxJGWoIDP6NwG6wYl1rj 8wTNP0aDfFGN+Sw8RyokhzMxnNnoKMSaCmXpJ+ix5bNptdS3PO3nFEsSiLBEuj9yhXhwGf KXDG6OiMRlEJwQrs6/or+IrtUQF4Q8+Ss8eDKN78yOUk9JT1mvQ3AJGNMZ1JRw== From: Davide Masserut Date: Tue, 05 Apr 2022 17:00:04 +0200 Message-ID: <87bkxftw23.fsf@mssdvd.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: mssdvd.com Received-SPF: pass client-ip=2001:41d0:2:863f::; envelope-from=dm@mssdvd.com; helo=out1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.4 (--) --=-=-= Content-Type: text/plain Tags: patch I have just noticed that the .bashrc file is not recognized as a bash file, so here is patch that should fix it. In GNU Emacs 29.0.50 (build 45, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) of 2022-04-05 built on T480s Repository revision: 7d504c9acc0c8d75d11c3a2b5e016f39e6156bf8 Repository branch: master System Description: Arch Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-sound=alsa --with-modules --without-libotf --without-m17n-flt --without-gconf --without-gsettings --with-native-compilation --with-xinput2 --with-pgtk --without-xaw3d --with-sound=no --without-gpm --without-compress-install '--program-transform-name=s/\([ec]tags\)/\1.emacs/' 'CFLAGS=-march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/home/davide/src/emacs-git/src=/usr/src/debug' LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now 'CXXFLAGS=-march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/home/davide/src/emacs-git/src=/usr/src/debug'' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-.bashrc-detection-to-sh-mode.patch >From 5c7da5307751e1d8c4eb6e715f5073fc3f179018 Mon Sep 17 00:00:00 2001 From: Davide Masserut Date: Tue, 5 Apr 2022 16:42:37 +0200 Subject: [PATCH] Add .bashrc detection to sh-mode * lisp/progmodes/sh-script.el (sh-mode): Add .bashrc string-match --- lisp/progmodes/sh-script.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 8dc5562143..9151fd0a34 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1549,7 +1549,7 @@ sh-mode ;; Checks that use `buffer-file-name' follow. ((string-match "\\.m?spec\\'" buffer-file-name) "rpm") ((string-match "[.]sh\\>" buffer-file-name) "sh") - ((string-match "[.]bash\\>" buffer-file-name) "bash") + ((string-match "[.]bash\\(rc\\)?\\>" buffer-file-name) "bash") ((string-match "[.]ksh\\>" buffer-file-name) "ksh") ((string-match "[.]mkshrc\\>" buffer-file-name) "mksh") ((string-match "[.]t?csh\\(rc\\)?\\>" buffer-file-name) "csh") -- 2.35.1 --=-=-=-- From unknown Fri Jun 20 07:19:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54727: Recognize .bashrc as bash Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Apr 2022 09:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54727 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Davide Masserut Cc: 54727@debbugs.gnu.org Received: via spool by 54727-submit@debbugs.gnu.org id=B54727.16492378804753 (code B ref 54727); Wed, 06 Apr 2022 09:38:02 +0000 Received: (at 54727) by debbugs.gnu.org; 6 Apr 2022 09:38:00 +0000 Received: from localhost ([127.0.0.1]:56961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nc26x-0001Eb-N9 for submit@debbugs.gnu.org; Wed, 06 Apr 2022 05:37:59 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nc26w-0001EJ-5H for 54727@debbugs.gnu.org; Wed, 06 Apr 2022 05:37:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ENEGa3aCod/r9NYVrJo3cf2FPTV7b8VNmriXo5rqTgw=; b=pswh82jJYnQYPQw5W1Z9aVXKdQ SxrT+njCD4tC1UmclO3UyIxtqLe0UIwZGy17hLEjCt1L+aSN82NsOpbOjRDpSg7UWEboKO/ql0G6d dHKneWN8hDbWqJPB1UF5zQn/y4B6e3046PzE7L0MtS55VtrZKymMt/wldzgZwdhasAnQ=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nc26n-0001HA-G4; Wed, 06 Apr 2022 11:37:51 +0200 From: Lars Ingebrigtsen References: <87bkxftw23.fsf@mssdvd.com> Date: Wed, 06 Apr 2022 11:37:48 +0200 In-Reply-To: <87bkxftw23.fsf@mssdvd.com> (Davide Masserut's message of "Tue, 05 Apr 2022 17:00:04 +0200") Message-ID: <87a6cyeemr.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Davide Masserut writes: > I have just noticed that the .bashrc file is not recognized as a bash > file, so here is patch that should fix it. Thanks; pushed to Emacs 29. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Davide Masserut writes: > I have just noticed that the .bashrc file is not recognized as a bash > file, so here is patch that should fix it. Thanks; pushed to Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 06 05:38:06 2022 Received: (at control) by debbugs.gnu.org; 6 Apr 2022 09:38:06 +0000 Received: from localhost ([127.0.0.1]:56965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nc273-0001FQ-Tv for submit@debbugs.gnu.org; Wed, 06 Apr 2022 05:38:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nc272-0001Ea-Qd for control@debbugs.gnu.org; Wed, 06 Apr 2022 05:38:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=d1jDMzPjoojcfOxydypreXtGpmh5ZpZYK/A1v8vNauM=; b=GwD2T22Uqax5UgZFIawm0PUWPY pRBZPRQGkW9d1VhfLHd0yW7vPwKqX7/h7pURdk169JX5kb9ytwHoP9KSJXOVB5hAp4njxfaoUyivY tWOHgpYiuN0XcNcG4QcrARASDBHCIl89mTubEYtZonxjucFwQTU5LwXTYyrHldUjBovY=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nc26u-0001HR-WC for control@debbugs.gnu.org; Wed, 06 Apr 2022 11:37:58 +0200 Date: Wed, 06 Apr 2022 11:37:54 +0200 Message-Id: <878rsieeml.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #54727 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 54727 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) close 54727 29.1 quit