Bash

Bash is widely available and well-supported. Use the built-in profile:

extensions:
  term:
    profile: bash

This sets shell: bash, shell-args: ["--norc", "--noprofile"], prompt: "$", and ps2: ">". No additional configuration is typically needed.

Basic Usage

echo "Hello from bash $BASH_VERSION"
Hello from bash 5.2.21(1)-release

Associative Arrays

declare -A colors
colors=([red]="#ff0000" [green]="#00ff00" [blue]="#0000ff")
for name in "${!colors[@]}"; do
  echo "$name = ${colors[$name]}"
done
blue = #0000ff
red = #ff0000
green = #00ff00

Process Substitution

diff <(echo -e "a\nb\nc") <(echo -e "a\nx\nc")
2c2
< b
---
x
echo "(exit code: $?)"
(exit code: 1)

Here Strings

while IFS=, read -r name age; do
  echo "$name is $age years old"
done <<< "Alice,30
Bob,25
Carol,35"
Alice is 30 years old
Bob is 25 years old
Carol is 35 years old