I am looking for a good editor that would provide me with an IDE-like experience in building shell scripts. Ideally, it should support Linux bash and Windows batch file formats, Windows Power Shell is definitely a plus, but not a requirement.
Here is what I am looking for:
- Syntax highlighting, at least for language constructs and known native commands/functions
- Auto-completion based on the insertion context, like the intellisence for Visual Studio. Most editors seems to support suggestions based only on the file contents, without having some sense for the appropriateness of the suggested item, depending on the use context
- Ability to detect open-close brackets and parentheses, highlight unclosed or incomplete expressions. This is quite important as I am personally not that good at shell scripting and most of my issues are caused by similar to the mentioned problems.
A plus would be:
- Ability to execute the script immediately, or configure a set of environment variables in the scope of a single execution.
- Definitely, a free solution will be gladly appreciated, still listing the commercial ones will not hurt, as I definitely have no idea what tools target this specific area, and more of this information at one place might be useful.
At the moment I'm using Notepad++ on Windows and Kate or Geany on Linux, but all have their auto-completion logic being based only on the file contents, rather than being context-oriented (if it is available at all). The syntax highlighting is not proper, failing to recognize some valid constructs, keywords or native functions/commands.
If you can also refer to an IDE or IDE plugin I'd be happy to get to know it too. I'd prefer any of the following IDEs, as I frequently use them and am familiar with, but feel free to extend beyond that list:
- Visual Studio (preferably 2010)
- Eclipse / STS
- MonoDevelop / Xamarin Studio
As I mentioned shell scripts for different OS-es, this would raise the question of what my target OS is. This is important as detecting the natively supported features of the shell script language may depend on that. The problem is that I am doing shell-scripting for both Windows and Linux, and this makes it quite hard for me to put a restriction on that matter.
So, in an attempt to reduce broadening the subject, I'd appreciate any of the following requirements for the suggestions:
- A combination of:
- A Windows tool allowing for development of Windows Shell scripts
- A Linux tool that supports the native Linux scripting
- A single cross-platform tool
- A single non-cross-platform tool that supports both Linux and Windows scripting, regardless of being native to the Linux or Windows OS