Question

I use Emacs for shell scripts. I know I read somewhere there's some mode to make it easier (code completion, autocomplete, bracket matching, syntax highligting, check syntax) to write Shell scripts on Emacs but haven't been able to find it. In short, I would like to turn Emacs into a Bash IDE.

Also, is there any other tool/IDE to make scripting easier on the GNU/Linux Shell?

Was it helpful?

Solution

Well, there's a built-in shell mode that does syntax highlighting, if it's not already turned on, M-x shell-script-mode will do it for you.

Regarding a tool to make scripting easier. There's a bash shell debugger, so if you program in bash, that would help quite a bit.

Of course there's eshell, a shell written in Emacs lisp, so you can get all the syntax highlighting you'd expect from lisp, the auto-completion, and the emacs lisp debugger.

OTHER TIPS

I don't think there is any mode for code completion for shell-scripts, at least not in Emacs. (I've actually never felt the need.) However, there is support in bash for completion when running interactively (the package is called "bash-completion", or something similar). This provides tab-completion for many shell-commands.

Another IDE for the VIM world:

Plugin bash-support.vim

screen shots

Help file on-line

Griffon is an IDE specifically designed for BASH scripting. Its features include autocomplete, syntax highlighting, error detection, and more.

I know it is old post, but i will like to share my settings.

I add the same issue and now I use the code below in my .emacs file for sh/bash code autocompletion.

(require 'auto-complete)
(require 'auto-complete-config)
(ac-config-default)

The syntax highlighted should already working if you use new version of Emacs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top