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.
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.
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.
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.
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.
Like most questions of this sort, the One True Answer is EMACS.
However, TextMate, BBEdit, and SubEthaEdit do nicely too.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With