[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9110: how to map sh-mode to mean bash-mode

From: Andreas Röhler
Subject: bug#9110: how to map sh-mode to mean bash-mode
Date: Mon, 18 Jul 2011 07:52:04 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv: Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

Am 17.07.2011 22:42, schrieb address@hidden:
Dear bug-gnu-emacs,
There is no way to map sh-mode to bash-mode.

Again: AFAIK there no such thing like `bash-mode' in Emacs.

There is a `sh-mode' dealing with several kind of shells.
If `sh-mode' thinks you are dealing with a bash -- by shebang or suffix-- it provides for it. An alias is called `shell-script-mode'

See C-h f shell-script-mode RET

for what it does.

As you know, the bash shell likes to call itself sh sometimes.

Didn't know that. Curious to read an example.

But it is really still bash.
Well, bash might use a sh as a subset. Don't know that architecture.

Hence I would like to make my emacs assume anything it thinks is sh is
really bash, and thus show me "bash" in the mode line, not "sh", no
matter how smart it thinks it is.

Could you deliver an example of usage for that?
If you send code written for a bash to a simple sh - some may work, others will fail.
You are surely implementing bugs then.

 See also
However the real solution should be a one liner of lisp in ones .emacs.

What's great about a one-liner? Usually they are hard to read.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]