Changelog of BashSupport Pro 3.0
An annotated list of all changes is available in the release announcement.
Content
General
- Added Support for 2022.3.
- Added Compatibility with Windows on ARM64.
- Added Support for the “call hierarchy” panel.
- Added Show icon for variable declarations, e.g. in the “Find Usages” dialog.
- Added The plugin is now signed before it’s uploaded to the Marketplace.
- Improved Minor performance optimizations of lexer and parser.
- Improved Minor performance improvements to the indexing of shell script files.
- Updated Dropped support for Markdown Navigator. This plugin isn’t available anymore on the JetBrains Marketplace.
- Updated Dropped support for IDEs 2020.1, 2020.2, and 2020.3.
- Updated The bundled shfmt now requires macOS 10.13 or later (dropped support for macOS 10.11 and 10.12).
- Updated Dropped intention “Explain shell”. Only a few users seem to use it, and it sends code to a remote site without obvious warning.
- Updated Don’t automatically send anonymous telemetry for EAP builds.
- Fixed Definitions contained in nested include files were not always found.
- Fixed Variables declared by
coprocare now marked as indexed array variables. - Fixed Incorrect paths to shell interpreters in the settings UI are highlighted as error.
- Fixed Possible deadlock at startup while attempting to initialize BashSupport Pro’s application settings.
- Fixed The “Apply” button of BashSupport Pro’s project settings was always enabled if project variables were set.
- Fixed Restored integration with the EnvFile plugin, because a compatible release is now available. Please note that this is experimental support.
- Fixed With the Simplified Chinese language pack: Notification about available ShellCheck translations wasn’t shown.
- Fixed Intentions are now also available when the IDE is indexing.
- Fixed “No license found” was shown even when a user had a valid license.
- Fixed Editing shell script libraries sometimes removed source and target settings.
- Fixed Binary incompatibility with 2022.1 reported by JetBrains plugin verifier.
- Fixed Exception
AstLoadingExceptioncaused by inspection “Variable only used locally”.
Editor
- Added Refactoring “Inline variable” for variable declarations and variable references.
- Added Support for “Join Lines” to automatically insert semicolons between commands.
- Added “Move element left and right” for command arguments, e.g. to quickly change
myFunc a bintomyFunc b a. - Added “Move element left and right” for command pipelines, e.g. to quickly change
a arg1 && b arg1intob arg1 && a arg1. - Added Highlighting all of a function’s exit points when you place the caret on one of the
returnorexitcommands. - Added New live template contexts “Literal”, “Bash: Literal”, “POSIX: Literal”.
- Added New live contexts to cover POSIX files, commands in POSIX files, Bash files, commands in Bash files
- Added New live template macro
testCommandStart()to insert[or[[, depending on the current shell type. - Added New live template macro
testCommandEnd()to insert]or]], depending on the current shell type. - Added New live template macro
shellVariable()to return the closest variable assignment in scope. - Added New live template macro
shellArrayVariable()to return the closest array variable assignment in scope. - Added Support for “Code: Move Statement Up” and “Code: Move Statement Down” for pipeline commands and function declarations.
- Added [#86]: Smart enter handler to automatically add a block statement to an incomplete function definition
- Added “Go to declaration” and rename for heredoc markers.
- Improved read/write presentation for variable references and assignments.
- Improved read/write highlighting of variable references.
- Improved “Inline Variable” refactoring in conditional commands.
- Improved Spellchecking of command argument values.
- Updated Live templates, which reference an array variable, now automatically select the closest array variable name.
- Updated Live templates, which contain a block of code, now insert
:as a fallback command to avoid inserting invalid syntax. - Updated Inspection suppression code
BP5001was used for to different inspections. Inspection “Google main() function style” is now usingBP5009instead. - Removed Live templates
git_branch_create,git_commit,git_push,mkdir,rm,system_info_linux,system_info_mac,system_kernel_info,xarg. - Fixed Some BashSupport Pro inspection codes, e.g.
BP5008, were not showing a tooltip on mouse hover. - Fixed Changed default code style highlighting of
BP...codes to match ShellCheckSC...codes. - Fixed
$REPLYwas not shown in variable name completions. - Fixed The
varassignment invar=value; ${var:=fallback}was incorrectly marked as unused variable declaration. - Fixed Exception
Exception (1464,1464), text: , language = Language: BashPro Shell Scriptfolding a then clause. - Fixed Exception
Assertion failed: Write access is allowed inside write-action onlywhen opening preview for quickfix “Prefer BashSupport Pro over ShellCheck”. - Fixed [#109]: The partial formatting after a refactoring was breaking source code. For now, the reformatting is turned off for refactorings.
- Fixed Live templates
array_all,array_at_index, andarray_lengthwere shown in parameter expansions. - Fixed Live templates
array_all,array_at_index, andarray_lengthwere shown in POSIX files. - Fixed Show
#!/bin/shand#!/bin/bashin code completion for the shebang. - Fixed Folding of a Google-style function comment was showing only
#characters because that was the first line. - Fixed The
dokeyword is now shown in code completion forwhileanduntilcommands. - Fixed The
donekeyword is now shown in code completion at the potential end of ado ... doneblock. - Fixed Inline rename was unavailable for heredoc markers.
- Fixed Quick documentation of conditional operators was displaying markdown as description.
- Fixed Intention “Add function keyword” was shown in bats-core files, but ShellCheck doesn’t like
@test function namedeclarations (yet). - Fixed Updating unclear names of intentions.
- Fixed Compatibility with 2022.3 EAP4 (builds 223.7126 and later).
- Fixed “Join lines” of a line with a line continuation now removes the indentation of the following lie.
Structure View
- Added Option and filter button to display variable declarations in the view. This also enabled navigation via
ALT+UPandALT+DOWNto navigate to the previous/next variable declaration (or function).
Syntax
- Added Color setting “Conditional operators: Operators” to cover all unary and binary operators other than the logical operators
||and&&. - Added Color setting “Arithmetic: Operators”.
- Added Color setting “Arithmetic: Logical Operators”.
- Improved Parsing of arithmetic expressions follows the Bash specification more closely, e.g.
(( a=b=c=42 ))is now parsed correctly. - Added Color setting “Arithmetic: Comma”.
- Changed Color setting “Conditional operators” renamed to “Logical Operators” and moved it into group “Conditional Operators”. It now inherits from “Operation sign” instead of “Keyword”.
- Changed Moved color setting “Number” into group “Arithmetic”.
- Fixed #97: “Go to definition” wasn’t properly working for variables declared in a pipeline. Attributes like “integer” are now properly inherited by variable definitions in subshells or pipelines (which create an implicit scope).
- Fixed Syntax highlighting of redirection characters
>,>>, and<. - Fixed Syntax parsing of old conditional commands with escaped redirects.
[ a < b ]contains a redirect, but[ a \< b ]is a comparison. - Fixed Name validation for function definitions. For example
ns::nameis now accepted as a valid function name. - Fixed Name validation for variables.
- Fixed Variable declared as
declare myVar=()was not marked as an array variable. - Fixed Support quoted variable names in assignments passed to a command, e.g.
ainexport "a"=b. Only static left-hand-side values are supported. - Fixed An incomplete
forloop is now highlighted as an error, e.g.for x in a b;
Run Configurations
- Added Support for remote execution and remote debugging with 2021.3 and later. This is leveraging the run targets feature of the IDE and has been tested with WSL, SSH and Docker run targets. SSH and Docker are only available in the paid IDEs.
- Added Support for the new Markdown runner feature of 2022.1 and later.
- Fixed Updated fork of pty4j in build for 2021.3 to make BashSupport Pro debugging work on a JetBrains Gateway host.
- Fixed Updated fork of pty4j to support Linux ARM devices like a Raspberry Pi.
- Fixed BashSupport Pro couldn’t set up and locate the bundled ShellCheck binary when executed with JetBrains Gateway.
- Fixed Don’t show run line markers for plain text files without a shebang line.
- Fixed Don’t show action “Run File” in the line marker actions for BashSupport Pro files.
- Fixed The working directory wasn’t always set correctly for remote debugging.
- Fixed
ClassCastExceptionwhen debugging a shell script on 2021.1 or 2021.2. - Fixed The introspection for the shell on the remote inserted invalid path values into the path text input.
- Fixed Interpreter arguments defined in the application settings were not applied when created from the additional context menu items (via “Shown in menus”).
- Fixed Execution and debugging on projects, which are located on a WSL network share.
Debugger
- Fixed Show inlay values for predefined variables like
$HOME. - Fixed Debugging a file on a WSL network share wasn’t working properly.
shfmt
- Updated Bundle shfmt 3.5.1.
- Added Bundle binary of shfmt for Windows ARM64.
bats-core
- Added Support for
Navigate > Testfor shell script files. Newly created test files are named like the source file, but with extension.bats. Please let us know if you need a more advanced implementation of “Create Test”, for example to create test method for eachfunctiondefined in the source file. - Added Bundle and support bats-core 1.8.2.
- Added Bundling bats-core libraries “bats-assert”, “bats-file” and “bats-support”. The environment variable
BATS_LIB_PATHis automatically setup when bats-core tests are executed. - Added Code completion of built-in function
bats_load_library. - Added Completion of bundled library names passed to
bats_load_library. - Added Support code completion and go-to-declaration for functions included in one of the bundled bats-core libraries if the
.batsfile loaded the library withbats_load_library. - Added Support and documentation for variables
BATS_TEST_RETRIES,BATS_TEST_TIMEOUT,BATS_VERSION, andBATS_TEST_NAME_PREFIX. - Added Support the new tags filter parameter
--filter-tags <tag list>. - Added Support for the bats-core comments
#@testto mark functions as bats-core tests. - Added Intention to switch between the
@testmarker and#@testcomments. - Added Quick documentation for built-in functions of bats-core, e.g. for
loadandbats_load_library. - Added Code completion of function and commands for the first argument of the bats-core
runcommand, e.g. forrun -1 myFunction. - Added Support and quick documentation for variables
$stderrand$stderr_lines. - Added Support bats-core function
bats_require_minimum_version. - Added Code completion shows global variables declared in
setupandsetup_fileat first invocation. By default, globals declared in functions are shown at the 2nd completion attempt (e.g. after pressingCtrl+Spacetwice). - Added New live template context “bats-core file level”.
- Added New live template context “bats-core @test function”.
- Added New live template
setup_file. - Added New live template
teardown_file. - Added New inspection to highlight duplicate test names in a
.batsfile. - Improved Code completion of bats-core variables, which are only available in a test method, now displays this information in the completion popup.
- Improved Highlighting of file path + line in bats-core error messages.
- Improved Mark newly created bats-core files as executable.
- Improved Show the cause passed of skipped tests in the test runner console, e.g. defined by
skip "cause". - Fixed The bats-core live templates now insert valid code by adding
:into bodies of inserted functions. - Fixed Don’t suggest names of
@testfunctions in code completion - Fixed Errors, which occurred at top-level of a
.batsfile were not printed on the test runner output console. - Fixed Completions to functions of a loaded bats-core library in dumb mode.
- Fixed bats-core code completion was unavailable in bats-core files.
Quick Documentation
- Added Documentation of commands is also fetched from
mannow. The equivalent ofman --html commandNameis executed. If there’s no man page, theninfois called as before. - Improved Tell when a function is a built-in, e.g.
runof bats-core. - Fixed Whitespace in example wasn’t preserved in the rendered documentation
Google Shell Code Style
- Improved Better rendering of quick documentation of functions, which are documented as defined by the style guide.
Docker
- Fixed
${NAME:-value}-style references to DockerENVorARGdeclarations were incorrectly overridden by BashSupport Pro. - Fixed The shell script language was injected into
RUNcommands, which followed a non-bashSHELLcommand. For example, Powershell commands are no longer highlighted as Bash.
Telemetry
- Added Added events “structure_view”, “caller_hierarchy”, “refactoring_move_left_right”, “refactoring_move_up_down” to telemetry. As before, telemetry is opt-in and no code or PII is sent.