Expand description
The Zsh shell implementation. The Zsh shell implementation.
Zsh is a peer of Bash, not a flavor of it: it owns its builtin table
(where, whence, which, print, and zsh-flavored echo, alias,
export, type), its dialect (messages and prompt), and its grammar.
The grammar today is the shared sh-family grammar (brush_parser),
which is the honest state of affairs for a first zsh: zsh syntax was
never formally specified and no maintained zsh grammar crate exists, so
zsh-specific constructs (glob qualifiers, extended globbing,
=command expansion, prompt escapes) are future work owned by this
implementation on top of the shared ShellCore.
What already differs from Bash, verified against a real zsh:
echointerprets backslash escapes by default (BSD behavior);aliaslists asname='expansion'without a prefix;exportlists asexport NAME=value;typesaysname is an alias for ...;- the
where/whence/which/printbuiltins; - the prompt (
user@host:~/path%with the home directory abbreviated to~).
Structsยง
- Zsh
- The Zsh-flavored shell.
- ZshInterpreter
- The behavior of
/bin/zsh: the Zsh dialect as a program (#!/bin/zshis interpreted by Zsh). Scripts andzsh -cinvocations run through the same implementation as interactive commands.