You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
About 100 more commands and builtins, chosen from a survey of shell scripts, Dockerfiles and workflows in popular repositories: package managers (apt-get, apk, dpkg, dnf, brew, pip), users and groups (id, useradd, adduser), system information and services (uname, nproc, systemctl), signatures and checksums (gpg, openssl, sha512sum), compression (xz, zstd), toolchains (go, cargo, node), gh, shellcheck and more, plus frequent options of known ones (set -E, test -z, tar --strip-components, curl --retry, jq --argjson…). In that survey, the share of commands explained went from 80% to 89%.
About 45 more from a second survey, of operations and cloud scripts, node bootstrap scripts and dotfiles: kubectl, helm, kustomize, kind, terraform, aws, gcloud, az, cosign, podman (with docker's subcommands), envsubst, dd, lsblk, iptables, usermod, ssh-keygen, bc, npx, pnpm, macOS's defaults and hdiutil, and more; docker buildx/system/inspect, gh pr options, git submodule/symbolic-ref/show-ref, comm -1 -2 -3. Across both surveys, about 90% of the commands met are now explained.
terraform -var-file=x and go test -count=1: single-dash long options with =value are read.
head -1, tail -5 and git log -3 are read as -n N.
sed -i.bak takes .bak as the backup suffix instead of more options.
gawk, mawk and nawk are explained as awk.
date +FORMAT gets a worked example: what it prints at two fixed moments (in UTC), editable in the panel. It replaces the note "right now this prints…", which changed with the time, so the same line now always gets the same explanation. More conversions are worked out (%s, %I, %p, %Z, %z, week numbers, %c…), checked against GNU date. Turn it off with the date kind in bashExplainer.examples.disabled.
Pitfalls are pointed out where they appear, with how to avoid them: x = 1 (a command, not an assignment), rm -rf $DIR/… when DIR may be empty, unquoted variables as paths and inside [ ], for f in $(ls) / $(find), for a in $*, read without -r, local x=$(cmd) hiding a failure, and sudo cmd > /etc/…. In about 165,000 lines of the surveyed scripts they were found about 400 times. Turn them off with bashExplainer.notes.pitfalls.
More CI systems: Jenkinsfile sh steps (in every quoting, with the $name and ${…} that Groovy fills in pointed out), CircleCI run: steps written with name: and command:, and Azure Pipelines script: and bash: steps, whose $(variable) macros are no longer taken for command substitution (script: on Windows agents, and PowerShell steps, are left out). The web version and the command-line tool (--kind jenkinsfile) read Jenkinsfiles too.
Code that is not shell is no longer explained as shell: the JavaScript of actions/github-script (with: script:), run: steps of jobs on Windows runners (PowerShell by default, unless the step says shell: bash), and Dockerfile stages that use PowerShell or cmd (SHELL ["powershell", …], Windows base images). SHELL now applies until the next FROM, as in Docker.
A step's shell: written after - run: is now taken into account.
The parser is updated: tree-sitter-bash 0.25.1 (from 0.23.3) with web-tree-sitter 0.27.0 (from 0.22.6). Explanations of bash scripts stay the same; scripts with syntax the grammar cannot read, such as zsh-only code, may be split up differently.