Changelog of BashSupport Pro 4.0

An annotated list of all changes is available in the release announcement.

Content

General

  • Added Support for 2024.1.
  • Added Provide help page URLs for a few places: project settings, find usages, setup wizard, run configurations.
  • Added Improve support for shell script files using unicode characters.
  • Added Allow creating new shell script projects using “File > New > Project… > New Project”. Item “Shell script” of the new project wizard allows to quickly set up a new project with just shell scripts.
  • Added Setting to configure the default shell script file template in a project.
  • Added Support file references for all function arguments, not just for arguments to source or bats-core’s load.
  • Updated Drop support for JetBrains IDEs 2021.1, 2021.2, and 2021.3.
  • Updated Welcome setup wizard for 4.0, linking to the new release announcement.
  • Fixed Performance improvements and memory usage of the shell script lexer and parser.
  • Fixed Performance improvements, especially for large shell script projects.
  • Fixed Faster indexing of large shell script projects.
  • Fixed If many exceptions are reported at once, don’t show a “Thank you” notification message for each, but only once.
  • Fixed File type detection with # shellcheck source=id for ids other than bash.
  • Fixed When detecting the type of a file, now a # shellcheck shell=... directive is preferred over a shebang line. This was changed to work in the same way as ShellCheck.
  • Fixed Don’t break if unset is used with quotes, e.g. unset "varName".
  • Fixed Added the missing icon next to the shell script project type at “File > New Project” with 2024.1.
  • Fixed For “New File > bats-core Test” the wrong template was preselected in the popup.

Editor

  • Added Color setting for parameter expansion operators, e.g. ${#myVar} or Zsh’s ${^myVar} or $^myVar.
  • Improved The “Generate…” editor popup actions work a little better now. Compound commands like while are now only inserted into a new line if really necessary and the current pipeline is expanded on the current line, if possible.
  • Added Support “Code Vision” for shell script functions.
  • Added Support focus mode for shell scripts
  • Added Suppress warnings of inspection “Unused local variable” also for # shellcheck disable=SC2034. Previously, only # bashsupport disable=BP3001 was supported to suppress this. ShellCheck uses SC2034 for both global and local variable usage checks.
  • Fixed Don’t show quickfix “Prefer BashSupport Pro over ShellCheck” for warnings emitted by inspection “Unused local variable”. BashSupport Pro’s inspection is already preferred by default.
  • Fixed Performance improvements to inspection “Only locally used global variable”.
  • Fixed Show file path completions for ${HOME} and not just for $HOME.
  • Fixed For some cases, the navigation to the closest and farthest variable definition was switched, i.e. navigation to the closest definition navigated to the farthest definition.
  • Fixed Use the SDK’s new interface to handle external formatters.
  • Fixed Don’t show duplicates in function name code completion.
  • Fixed Line indentation for here document content.
  • Fixed Line indentation for here document content with TAB removal, e.g. for <<- EOF.
  • Fixed Line indentation for case patterns with activated code style setting “Indent switch patterns” is now correct.
  • Fixed If shell script libraries are configured, don’t resolve variables to local variable declarations inside such library.
  • Fixed Action “Navigate > Navigate in File > Next/Previous method” is now only jumping to function declarations. Previously, variable declarations were valid targets, too.
  • Fixed Automatic completions for file paths are now only shown if the path string starts with ./, ../, ~/ or /. Manual invocation of completions is still shown file path suggestions for every path.
  • Fixed File paths suggestions are now shown at the end of the list and are not shown before local functions or built-in commands.
  • Fixed In 2023.3 and later warnings and highlights of inspections were not shown. This was caused by code obfuscation which was incompatible with IntelliJ’s optimization of inspections.

Syntax

  • Fixed Parsing of arithmetic operator *=.
  • Fixed Parsing of if without a terminator token after a compound command, e.g. if { cmd; } then cmd; fi
  • Fixed export "$1=$2" is not a valid variable name.
  • Fixed Parsing of while/until commands without a separator before do, e.g. while (( x == 1 )) do echo okay; done.
  • Fixed Parsing of if x then elif else fi with empty commands.
  • Fixed Improved parsing and handling of line continuations, e.g. in assignments.
  • Fixed Lexing of files with composed unicode characters is working properly now.

Inspections and Intentions

  • Improved Inspection “Unused global variable” now uses a more accurate, faster and less ressource hungry implementation when it’s executed as a batch inspection via Code > Inspect Code.... The inspection, which is executed in non-batch mode (e.g. for editor highlighting) is also faster and less ressource hungry compared with the latest version of the 3.x line.

Quick Documentation

  • Added Shell script examples in quick documentation of built-in variables and functions are now displayed with syntax highlighting.
  • Added Render sample of output for example snippets of shell script variable documentation.

Google Style

  • Updated Added a comment to the main function of the file template

Run configurations

  • Added Setting to define the type of new run configurations. If you’re in a team where others use the JetBrains Shell plugin, you’re now able to create and share run configurations which are compatible with JetBrains Shell.
  • Added in 2023.3+: Integrate with the new support for .env files by JetBrains. The run configuration settings now specify one or several .env file to evaluate before the run configuration is executed. All available run configuration (“BashSupport Pro” and “Bats-Core”) are integrating with the new .env files support.
  • Added Show run line markers for injected shell script snippets. The new setting “Show run line marker for injected shell script snippets” allows to turn this feature off. For example, it’s now possible to execute script snippets embedded in other source files.
  • Added The setup of environment variables now supports references to the parent environment. For example, you can now set PATH to /home/user/bin:$PATH$ to extend the current $PATH environment variable. This feature is only available with JetBrains IDEs 2023.2 and later.
  • Added Run configuration option to control if references like $PATH$ in environment variable values are inlined. Inlining is enabled by default.
  • Removed in 2023.3+: Drop integration with the 3rd-party EnvFile plugin, which doesn’t seem to be actively maintained anymore.
  • Updated Made the different run configurations types editable during indexing.
  • Fixed When executing with WSL, variable WSLENV wasn’t properly set up.
  • Fixed Error “/dev/tty: No matching device” when executing commands, which require a fully functional terminal.

Debugger

  • Updated Sync with the latest versions of bashdb.
  • Fixed Line feeds and other special characters are now properly displayed in the list of variables.
  • Fixed The list of variables is now displayed much faster than before. This improves the speed of stepping through a shell script.
  • Fixed Navigating to the source file of a stack frame wasn’t working if the runtime working directory changed in the debugged script.
  • Fixed Breakpoints located in sourced files were not always shown when the script execution suspended.
  • Fixed Exception Slow operations are not allowed... when navigating with the debugger stack.
  • Fixed Debugging on Windows wasn’t working properly due to problems with DLL loading.

Zsh Support

  • Added Show variables for the Zshdb top frame in the debugger interface.
  • Added Code completion of all Zsh parameter expansion flags. Further improvements will be made for complex flags like (j::).
  • Added Code completion of variable names after typing $#.
  • Added Color setting for Zsh parameter expansion flags, e.g. ${(kv)var}.
  • Added Color setting for Zsh simple and complex modifiers, e.g. $var:u or ${var:F:1+2:s/a/z/}.
  • Added Detect files starting with #compdef or #autoload as Zsh shell scripts.
  • Added Display the Zsh module in code completion of builtin Zsh variables.
  • Added Documentation of all Zsh parameter expansion flags.
  • Added Support for Debugging, based on zshdb.
  • Added File template for Zsh scripts.
  • Added Live template dir_zsh for Zsh scripts.
  • Added Live template foreach_kv to insert a Zsh foreach loop to iterate over key-value pairs of an associative array.
  • Added Live template foreach to insert a Zsh foreach loop.
  • Added Live template repeat to quickly insert a Zsh repeat command.
  • Added Live template contexts for Zsh.
  • Added Parsing of Zsh modifiers, e.g. $name:s/a/z/ or ${name:F:1+3:U:A}.
  • Added Parsing of Zsh’s alternate form of if: if [[ a ]] { b } else { c }.
  • Added Parsing of Zsh’s alternate form of while: while (( n < 10 )) { command }.
  • Added Parsing of anonymous functions, e.g. function { echo $* } a b c or () { echo $* } a b c.
  • Added Parsing of compound commands without a trailing separator, which is optional in Zsh but not in Bash, e.g. a() { command }
  • Added Parsing of the repeat command (repeat 1+2 do echo hello; done) and the alternative form of the repeat command (repeat 1+2 { echo hello }).
  • Added Parsing of try-always blocks.
  • Added Parsing, rename, find usages, completions, etc. for function aliases, e.g. function name alias1 alias2() { :; }.
  • Added Provide Zsh variables for navigation, code completion and quick documentation (work in progress).
  • Added Support debugging of remote run targets for run configurations using Zsh.
  • Added Support execution of remote run targets for run configurations using Zsh.
  • Added Support parsing of Zsh parameter expansion flags.
  • Added Support parsing of Zsh’s a &| and a &!.
  • Added Support parsing of Zsh’s additional parameter expansions, e.g. ${+name}, ${name::=word}, ${name:#pattern}, ${^spec}.
  • Added Support parsing of $#name, $+name, $^name, etc.
  • Added Support parsing of $name[key_expression].
  • Added Support parsing of ((#name)).
  • Added Support parsing of arithmetic operators ^^, &&=, ||=, ^^=, **=.
  • Added Support parsing of nested expressions in parameter expansion, e.g. ${${name}[1]}.
  • Added Very early parser and syntax support for the Zsh language.
  • Added Zsh builtin commands are now available for code completion in Zsh shell scripts.
  • Fixed Better parsing and highlighting for parameter expansion flags q, g, s, j, and Z.
  • Fixed Don’t accept Bash-only code ${!name*} or ${name@Q} as valid.
  • Fixed Don’t accept Bash-only parameter expansion ${!name} in Zsh.
  • Fixed Don’t break if unset is used with a pattern, e.g. unset -m 'namePrefix*'.
  • Fixed Lazy parsing of { ... } and do ... done blocks in Zsh, e.g. when typing into the body of a function definition.
  • Fixed Parsing of variable modifiers in double-quoted strings.
  • Fixed Properly support variables declared by typeset -F.
  • Fixed Stepping out of subshells was broken.
  • Fixed Support redirects before compound commands, e.g. >out.txt while a; do echo b; done.
  • Fixed zshdb wasn’t supporting whitespace in the installation directory, which frequently is the case on macOS.

bats-core

  • Added Mark bats-core files as test sources.
  • Added Markers of failed tests now show the last recorded state, e.g. a red icon if the test method failed the last time it was executed.
  • Updated Bundle the final release 1.11.0 of bats-core.
  • Updated Update bundled libraries bats-assert, bats-file and bats-support to the latest available versions.

shfmt

  • Updated Bundle shfmt 3.8.0. macOS 10.15 Catalina or later, On Windows at least Windows 10 or Windows Server 2016 is now required.

ShellCheck

  • Added Support ShellCheck directive source-path= to define the directories where sourced files are searched. File-level directive comments are supported, too.
  • Added Support quoted values of ShellCheck directives, e.g. # shellcheck source="file with spaces.bash". ShellCheck 0.9 added support for quoted values.
  • Added Quick fix for SC2046 (Quote this to prevent word splitting).
  • Added File path completion for ShellCheck source directives
  • Updated Bundle ShellCheck 0.10.0. On macOS, version 11.3 or later is required now (Big Sur).
  • Fixed Dynamic source commands like . $VAR/file.bash did not show a warning and quickfix if a ShellCheck comment # shellcheck was attached to the source command.
  • Fixed Parsing of incomplete # shellcheck source=" directives.

Terminal

  • Added support the new experimental terminal command and argument completion of 2023.3 EAP.
  • Fixed Update to changed API of new terminal UI of 2024.1 EAP2.

Markdown

  • Fixed For code blocks with code fence ID zsh the new Zsh language is injected now.
© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款