Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDE that provide autocompletion and error detection for Linux bash or shell scripting?

Our dev team is looking for an IDE like vi or nano or even textpad for windows that has the capability to autocomplete and error correction for bash or shell script for linux. Basically something similar to .NET autocompletion where you will be able to see if an

 if[ $# -ne 5 ]; then 

has no space between the 5 and the ] will tell you.

I hope this question is simple and easy to answer. I have seen that vi in RHE use some coloring but in CentOS5 it does not shows the different colors. Non of them use error detection or auto-completion.

like image 806
Geo Avatar asked Dec 18 '08 21:12

Geo


People also ask

Which IDE is best for shell scripting?

IntelliJ IDEA provides coding assistance for shell script files: completion (including local paths), highlighting, quick documentation, textual rename refactoring, and more. It also includes a special type of run/debug configurations for shell scripts.

What is Bash software used for?

Bash can be used to automate software development tasks such as code compilation, debugging source code, change management and software testing. Network engineers use Bash to test, configure and optimize network performance on organizational networks.

Can we run shell script in PyCharm?

We know that PyCharm on Linux can create and run shell scripts because PyCharm use the /bin/bash on Linux. But on Windows, PyCharm doesn't know where to find /bin/bash. So I change the settings on PyCharm on Windows 10. In File-->Settings-->Tools-->Terminal, change the shell path from cmd.exe to bash.exe.

Is Python or Bash better for scripting?

Python is easy, simple and powerful language. Bash is tough to write and not powerful as python. It is specially designed for web and app development.


2 Answers

Like most questions of this sort, the One True Answer is EMACS.

However, TextMate, BBEdit, and SubEthaEdit do nicely too.

like image 164
Charlie Martin Avatar answered Oct 20 '22 16:10

Charlie Martin


In vim, apart from adding syntax highlighting to show incorrect syntax (the "if" example would not highlight the if correctly) you can add this to your .vimrc:

autocmd FileType sh set makeprg=bash\ -n\ '%'
autocmd FileType sh let &efm = "%E%f:\ line\ %l:\ %m," . &efm

Now when you run :make it will check the syntax and jump to errors. Map :make to F5 and syntax checking is just a key press away.

like image 42
richq Avatar answered Oct 20 '22 17:10

richq