Z Shell Support
Starting with version 4.0, BashSupport Pro provides support for Z Shell script development.
Editor Support
The editor features available for POSIX and Bash are supported in the same way for Zsh scripts.
BashSupport Pro supports Zsh’s built-ins:
Code Completion
Code completion is available for Zsh. It’s supporting all of Zsh’s built-in variables. Please refer to Zsh built-in variables for the complete list, along with documentation and examples.
- Completion of Predefined Variables
- If a variable is defined by a Zsh module, the module name is shown in the popup.
- Parameter Expansion Flags
- In the same way, parameter expansion flags are suggested where appropriate.
- Modifiers
- Zsh variable modifiers are suggested, too.
Quick Documentation
Much time and energy was spent to support quick documentation of all built-ins of Zsh. We hope that this helps to tackle Zsh’s increased complexity. Our website provides the same information online.
- Documentation of Predefined Variables
- Documentation of Parameter Expansion Flags
- Documentation of Modifiers
Run Configurations
Zsh scripts can be executed just like any other shell script files. Please refer to Run Configurations how to execute scripts with BashSupport Pro.
Debugger
zshdb is used to support the debugging of Zsh scripts. We’ve contributed fixes and improvements to zshdb for a better integration with BashSupport Pro.
Remote Development
Remote development with run targets is supported. You can execute and debug Zsh shell scripts on remote system. Please refer to the page above for instructions.
Known Limitations
Compared to Bash and POSIX script development, there are limitations.
Syntax Support
Most of Zsh’s complex syntax is properly parsed and understood by BashSupport Pro.
With version 4.0, there are known limitations of syntax support and highlighting:
- Extended globs
- Extended array access, e.g. ranges
- Additional variable types and flags, e.g. floating numbers
- Possibly more of Zsh’s extended syntax we’re not aware of yet
Inspections and ShellCheck
Because ShellCheck does not support Zsh, there are fewer warnings shown for Zsh files. Unfortunately, it’s out-of-scope to add Zsh support to ShellCheck.
BashSupport Pro’s own inspections are still available for Zsh.
Formatting
BashSupport Pro uses shfmt to format shell scripts, but shfmt does not support Zsh. Adding Zsh support to shfmt is out-of-scope, too.
We’re planning to add a native formatter to BashSupport Pro, which is able to format all support shell scripts and does not rely on shfmt.
Roadmap
Zsh support will be improved in the future updates. Because it’s a huge amount of work, it’s going to take time.
Most important is complete parsing of Zsh syntax and formatting.
The next versions will add inspections and quickfixes for Zsh’s unique features.
Please provide feedback if you notice a bug, a missing feature or if you have an idea how to improve the Zsh development experience.