Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 17:07
· 1346 commits to main since this release

First release.

Explanations

  • Line-by-line explanations of shell scripts in English and Japanese: commands and options (about 120 commands and builtins, with combined flags, option values and subcommands), operators, redirections and their order, ${…} expansions part by part, control flow, and well-known idioms.
  • The languages inside arguments: regular expressions (BRE, ERE, PCRE), sed scripts, awk programs, jq and yq filters, perl one-liners, printf and date formats, find expressions, chmod modes, sort -k / cut -f / tr sets, getopts / getopt option strings, and git log --pretty / --date formats.
  • Worked examples with sample input and output, for regexes, sed, awk, jq, yq, perl, text filters, whole pipelines, expansions, printf, globs, tests, xargs, read, getopt and git log. They are computed by built-in code that the tests check against the real tools.
  • Your own commands, described in bashExplainer.customCommands.

Ways to show them

  • A hover for the line under the mouse, or for the cursor line with Ctrl+K Ctrl+E (Cmd+K Cmd+E on macOS).
  • A panel that follows the cursor, inspired by regex101: edit an example's input and watch the output change, with matches and capture groups highlighted; fold the tree, copy it as Markdown, switch the shell or yq for the file, and search a quick reference.
  • An inline one-line summary at the end of the cursor line.

Other shells and other files

  • Constructs that POSIX sh, dash, ash, yash, ksh, mksh or zsh do not support are pointed out, and behaviour that differs from bash is noted. The shell is detected from the shebang, a # shellcheck shell= line or the file name.
  • Shell code inside Dockerfiles, Makefiles, GitHub Actions and GitLab CI YAML, package.json scripts, Markdown code blocks and Python subprocess / os.system calls is explained too, with warnings about script injection, Docker RUN pipes without pipefail and Python commands passed without shell=True.
  • yq commands are recognised as mikefarah/yq v4, kislyuk/yq or mikefarah/yq v3, with the first v4 release that has what the command uses.

Problems panel

  • Warnings in the Problems panel, with quick fixes where the rewrite keeps the meaning ([[ ]] → [ ], == → =, source → ., &> → > … 2>&1, and more).
  • # bash-explainer disable=<code> and disable-file=<code> comments, and bashExplainer.diagnostics.ignore, to silence them.

Privacy

  • Works offline by design: no network access, no AI, no telemetry, no external processes. A CI check keeps it that way.