2016-02-19 22:23:19 +05:30
|
|
|
# zsh
|
|
|
|
|
2021-05-20 16:13:41 -04:00
|
|
|
> Z SHell, a Bash-compatible command-line interpreter.
|
2023-01-08 01:25:25 +10:00
|
|
|
> See also: `bash`, `histexpand`.
|
2019-06-03 02:06:36 +02:00
|
|
|
> More information: <https://www.zsh.org>.
|
2016-02-19 22:23:19 +05:30
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
- Start an interactive shell session:
|
2016-02-19 22:23:19 +05:30
|
|
|
|
|
|
|
`zsh`
|
|
|
|
|
2023-01-08 01:25:25 +10:00
|
|
|
- Execute specific [c]ommands:
|
2016-02-19 22:23:19 +05:30
|
|
|
|
2023-01-08 01:25:25 +10:00
|
|
|
`zsh -c "{{echo Hello world}}"`
|
2016-02-19 22:23:19 +05:30
|
|
|
|
2023-01-08 01:25:25 +10:00
|
|
|
- Execute a specific script:
|
2016-02-19 22:23:19 +05:30
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
`zsh {{path/to/script.zsh}}`
|
2016-02-19 22:23:19 +05:30
|
|
|
|
2023-01-08 01:25:25 +10:00
|
|
|
- Check a specific script for syntax errors without executing it:
|
|
|
|
|
|
|
|
`zsh --no-exec {{path/to/script.zsh}}`
|
|
|
|
|
2023-07-02 06:12:01 -07:00
|
|
|
- Execute specific commands from `stdin`:
|
2023-01-08 01:25:25 +10:00
|
|
|
|
|
|
|
`{{echo Hello world}} | zsh`
|
|
|
|
|
|
|
|
- Execute a specific script, printing each command in the script before executing it:
|
2016-02-19 22:23:19 +05:30
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
`zsh --xtrace {{path/to/script.zsh}}`
|
|
|
|
|
|
|
|
- Start an interactive shell session in verbose mode, printing each command before executing it:
|
|
|
|
|
|
|
|
`zsh --verbose`
|
2022-07-18 08:20:16 +02:00
|
|
|
|
|
|
|
- Execute a specific command inside `zsh` with disabled glob patterns:
|
|
|
|
|
|
|
|
`noglob {{command}}`
|