GNU bug report logs -
#17991
shell-mode: fails to recognize .bashrc files as shell scripts
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17991 in the body.
You can then email your comments to 17991 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17991
; Package
emacs
.
(Thu, 10 Jul 2014 18:15:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 10 Jul 2014 18:15:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Would be helpful if shell-mode understood that .bashrc*, .profile*, etc.
are shell scripts. Right now, they are treated as fundamental.
--
Cheers,
Andrew Pennebaker
www.yellosoft.us
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17991
; Package
emacs
.
(Thu, 10 Jul 2014 18:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 17991 <at> debbugs.gnu.org (full text, mbox):
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)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17991
; Package
emacs
.
(Thu, 10 Jul 2014 19:18:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 17991 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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?
On Thu, Jul 10, 2014 at 1:23 PM, Glenn Morris <rgm <at> 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
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17991
; Package
emacs
.
(Fri, 11 Jul 2014 07:20:02 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <at> gnu.org <mailto:rgm <at> 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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17991
; Package
emacs
.
(Fri, 11 Jul 2014 12:21:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 17991 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
That's not a bad idea.
Personally, I don't like inserting any editor-specific text in my code (I
woundn't use the equivalent Vim cookie either).
My current workaround is to manually add (.\bashrc|\.profile).* to
auto-mode-alist. I just wish this were the default pattern.
... is there another convention for naming multiple bash configs, per
machine, that matches the existing patterns? I guess I could use ".
bashrc.android.sh", ugly but functional.
On Jul 11, 2014 2:20 AM, "Kevin Rodgers" <kevin.d.rodgers <at> gmail.com> wrote:
> 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 <at> gnu.org <mailto:
>> rgm <at> 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
>
>
>
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17991
; Package
emacs
.
(Fri, 11 Jul 2014 12:53:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 17991 <at> debbugs.gnu.org (full text, mbox):
Andrew Pennebaker <andrew.pennebaker <at> gmail.com> writes:
> My current workaround is to manually add (.\bashrc|\.profile).* to
> auto-mode-alist. I just wish this were the default pattern.
I don't consider this a workaround, but rather the correct way to handle
such personal preferences.
> ... is there another convention for naming multiple bash configs, per
> machine, that matches the existing patterns? I guess I could use ".
> bashrc.android.sh", ugly but functional.
Since the shell is a full programming language, there are no limits in
what people will do with the startup scripts.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Added tag(s) wontfix.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 11 Jul 2014 18:43:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
17991 <at> debbugs.gnu.org and Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 26 Dec 2015 15:47:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 24 Jan 2016 12:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 204 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.