BashSupport Pro 4.0: New Features and Changes
BashSupport Pro 4.0 is a new major version. The long-awaited support for Zsh is finally available, among many other new features, improvements and fixes.
On this page you will find an annotated list of the most important changes since version 3.3. Please refer to the complete changelog for a complete list.
Users, who already used the trial of 3.x can now activate a new trial period for the new version. Every license purchased at Mar 21, 2024 or later already qualifies for the new version.
Content
Compatibility and System Requirements
JetBrains IDEs
With the new release, the latest JetBrains 2024.1 IDEs are fully supported.
Support for 2021.1, 2021.2 and 2021.3 has been dropped. If you’re still using one of these older versions, please continue to use BashSupport 3.x.
macOS
Even though BashSupport Pro itself is working on any version of macOS, the bundled binaries of ShellCheck and shfmt are only compatible with macOS 11.3 or later.
It’s possible to configure BashSupport Pro to use the binaries installed on your system if you’re using an unsupported version of macOS.
Z Shell Support
Support for Z shell scripts is finally available. This page lists the available features and limitations.
BashSupport Pro 4.0 supports the development of Zsh shell scripts, including advanced features like debugging.
Because this release is the first version with support for the Z shell, the feature-set is not yet as complete as for Bash and POSIX. The next updates will improve and expand it.
Syntax
Most of Zsh’s extended syntax is already supported:
- parameter expansion flags
- variable modifiers
- additional commands like
repeat
ortry-always
- alternative forms of complex commands like
if
,for
orwhile
- anonymous functions
Editor Support
BashSupport Pro provides powerful features to edit Zsh scripts. This includes live-templates, advanced completions, documentation and more.
Debugging
With the new version, you’re able to debug your Zsh scripts with the IDE’s native interface in the same way as Bash and POSIX scripts.
Remote debugging is also available for Z shell scripts.
Code Completion
Similar to Bash and POSIX scripts, completion of variables and functions defined in your scripts is available.
Additionally, 257 built-in variables of Zsh, 49 parameter expansion flags and 20 variable modifiers of Zsh are suggested by code completion.
Quick Documentation
Similar to code completion, quick documentation is available for variables and functions defined in your scripts.
There’s documentation available for all built-in variables, e.g. $RANDOM
.
In the same way, it’s also available for parameter flags (${(@)...}
) and variable
modifiers like $name:a
.
Known Limitations of Zsh Support
Some of the extended syntax of Zsh is not yet supported. For example, the parsing of Zsh’s extended glob syntax is not yet complete.
Executing and especially debugging Zsh on Windows is not fully supported yet. It’s planned to support debugging with Cygwin’s Zsh and also WSL’s Zsh. It’s still unclear if this setup is actually supported in a Windows environment.
The next updates of BashSupport Pro will fix and improve the limitations mentioned above.
New Project Wizard
As a major usability improvement the “New Project” wizard of your IDE now allows to create shell script projects.
With this wizard it’s possible to configure the default shell script type, for example if you prefer to create POSIX or Zsh scripts instead of Bash files. This setting is also available in existing projects, of course.
Editor
Code Vision
JetBrains’ Code Vision, which is based on Inlay Hints, is now supported to display the author next to a function definition.
Focus mode
You can now enable “Highlight only current declaration” to highlight the function definition you’re working on and to dim the others.
Performance
The performance of highlighting, syntax analysis and inspections has been improved. Especially the editing of large scripts should be more responsive now.
Run Configurations
Support for .env Files
With 2023.3 JetBrains added support for .env files to the IDEs. Version 4.0 of BashSupport is integrating with the new support. The support for the 3rd-party EnvFile plugin has been dropped for 2023.3 and later in favor of the official .env support.
JetBrains Shell Run Configurations
Run configurations created by the JetBrains Shell plugin were already supported by BashSupport Pro 1.0. It was always possible to execute these run configurations even if JetBrains Shell was not installed.
Version 4.0 now allows to create JetBrains Shell-compatible run configurations by default instead of BashSupport Pro’s native run configurations.
Referencing Existing Environment Variables
It’s now possible to reference the system’s value of environment variables in the setup of a run configuration’s environment variables.
For example, you could define PATH
as /home/user/bin:$PATH$
to prepend a new search path to your system’s existing setup of $PATH
.
ShellCheck
Version 0.10.0 of ShellCheck is now bundled.
Version 4.0 of BashSupport adds support for ShellCheck’s source-path=
directive.
This directive allows to define the search-path for sourced files in a shell script.
Quoted values of ShellCheck directives are supported now, too. This is especially helpful for paths with spaces.
bats-core
BashSupport Pro 4.0 bundles the latest release of bats-core, version 1.11.0. The new version supports dynamically defined tests.
In the IDE all .bats
files are now highlighted as test files.
This helps to quickly locate tests in a project.
Navigate → Test is supported for shell script files.
Use it to quickly create a matching .bats
file for your shell script.
The line marker next to @test
functions now displays the last recorded state.
For example, a red marker is shown for test functions which had a test failure in the previous test execution.
shfmt
shfmt 3.8.0 is now bundled with BashSupport Pro to improve formatting of your shell scripts.
Miscellaneous Changes
Help Links
Many dialogs of JetBrains IDEs provide help buttons. Now, most of BashSupport Pro’s dialogs link to our manual pages.
Terminal Plugin Integration
Version 4.0 integrates with the new, experimental terminal of JetBrains IDEs 2024.1. Without BashSupport Pro, the terminal uses the JetBrains Shell plugin to parse the entered commands and arguments.
Markdown Plugin Integration
With the JetBrains Markdown plugin, zsh
is now available as code fence ID for code blocks.
Syntax highlighting and parsing is properly adjusted if this ID is used.
Here’s the complete changelog of version 4.0.
Subscribe to our newsletter to receive updates about important developments, tips, and special offers.