From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: 17991@debbugs.gnu.org
Subject: bug#17991: shell-mode: fails to recognize .bashrc files as shell scripts
Date: Fri, 11 Jul 2014 01:19:40 -0600 [thread overview]
Message-ID: <lpo34q$66o$1@ger.gmane.org> (raw)
In-Reply-To: <CAHXt_SXhM19cqOj7sugEh15KoE0K9jsjKder+O1V2-2CamB6Yw@mail.gmail.com>
On 7/10/14 1:17 PM, Andrew Pennebaker wrote:
> Yes, same on my machine.
>
> I think this problem is specific to alternative config files (I've got a
> ".bashrc" for primary computer, ".bashrc-cygwin" for Windows, ".bashrc-android"
> for Android, and so on.
>
> Could the default auto-mode-alist entry be tweaked to include any file with
> ".bashrc" as a prefix?
Why not just add a major mode cookie (comment) at the top of your
non-standardly-named files?
# -*- mode: sh; -*-
> On Thu, Jul 10, 2014 at 1:23 PM, Glenn Morris <rgm@gnu.org <mailto:rgm@gnu.org>>
> wrote:
>
> Andrew Pennebaker wrote:
>
> > Would be helpful if shell-mode understood that .bashrc*, .profile*, etc.
> > are shell scripts. Right now, they are treated as fundamental.
>
> Works for me.
>
> emacs-24.3 -Q .profile -> shell-script
> emacs-24.3 -Q .bashrc -> shell-script
>
> C-h v auto-mode-alist
> ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
> ("\\(/\\|\\`\\)\\.\\(bash_profile\\|z?login\\|bash_login\\|z?logout\\)\\'"
> . sh-mode)
> ("\\(/\\|\\`\\)\\.\\(bash_logout\\|shrc\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'"
> . sh-mode)
>
>
>
>
> --
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us <http://www.yellosoft.us>
--
Kevin Rodgers
Denver, Colorado, USA
next prev parent reply other threads:[~2014-07-11 7:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-10 18:13 bug#17991: shell-mode: fails to recognize .bashrc files as shell scripts Andrew Pennebaker
2014-07-10 18:23 ` Glenn Morris
2014-07-10 19:17 ` Andrew Pennebaker
2014-07-11 7:19 ` Kevin Rodgers [this message]
2014-07-11 12:20 ` Andrew Pennebaker
2014-07-11 12:52 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='lpo34q$66o$1@ger.gmane.org' \
--to=kevin.d.rodgers@gmail.com \
--cc=17991@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).