Files
tldr/pages.zh/common/zsh.md
2024-11-11 18:06:32 -08:00

38 lines
773 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# zsh
> Z SHell一个兼容 Bash 的命令行解释器。
> 参见:`bash``histexpand`.
> 更多信息:<https://www.zsh.org>.
- 启动交互式解释器:
`zsh`
- 执行指定的命令:
`zsh -c "{{echo Hello world}}"`
- 执行指定的脚本:
`zsh {{路径/到/脚本.zsh}}`
- 不执行指定的脚本,只检查其语法错误:
`zsh --no-exec {{路径/到/脚本.zsh}}`
- 执行来自 `stdin` 的命令:
`{{echo Hello world}} | zsh`
- 执行指定的脚本,并打印出每一个将要执行的命令:
`zsh --xtrace {{路径/到/脚本.zsh}}`
- 启动详细模式的交互式解释器,会打印出每一个将要执行的命令:
`zsh --verbose`
-`zsh` 里执行指定的命令,但禁用 glob 模式:
`noglob {{命令}}`