- $(command) is replaced by the output of command, which runs in a
subshell (gosh -c), so cd/set in it do not change the shell
- trailing newlines are removed; unquoted the output is split into words
at blanks and newlines, "$(...)" stays one word; wildcards in the
output are not expanded
- nested substitutions, quotes and operators inside are handled; the
list, alias and brace scanners skip $(...) as a whole
- a command that consists only of a substitution has its exit status,
Ctrl+C in a substitution aborts the command
- $((...)) is reported as not supported
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- alias name=value defines aliases, alias lists or shows them in a form
that can be read back, unalias removes them (unalias -a: all)
- the first word of every command (at the start and after ;, &, &&, ||
and |) is replaced, the value is expanded again except for aliases
that are already being expanded (alias ls='ls --color' works)
- a value ending with a blank makes the next word a command name too
- quoted or escaped words (\ll, 'll') skip the alias
- aliases are only expanded in interactive shells and their startup
files, like in bash
- tab completion includes aliases
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>