Zsh
Zsh is the default shell for quarto-term. Use the built-in profile:
extensions:
term:
profile: zshThis sets shell: zsh, shell-args: ["--no-rcs"], prompt: "$", and ps2: ">". For syntax highlighting, add zsh-syntax-highlighting to init:
extensions:
term:
init:
- zsh-syntax-highlightingBasic Usage
echo "Hello from $ZSH_NAME $ZSH_VERSION"
Hello from zsh 5.9
Associative Arrays
typeset -A fruits
fruits=(apple red banana yellow cherry pink)
for k v in ${(kv)fruits}; do print "$k is $v"; done
apple is red
banana is yellow
cherry is pink
Glob Qualifiers
mkdir -p /tmp/zsh-demo && cd /tmp/zsh-demo
touch file1.txt file2.txt script.sh
chmod +x script.sh
print -l *(.)
file1.txt
file2.txt
script.sh
Parameter Expansion
words="hello world foo bar"
print ${(U)words}
HELLO WORLD FOO BAR
print ${(ws: :)words}
hello world foo bar