mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-02 18:55:42 +02:00
zsh: refresh page (#7990)
* Refresh a page: - better grammar - better token syntax * Add reading from stdin example * Apply suggestions from code review Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> * Make page consistent with `pwsh` page * Update pages/common/zsh.md Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
This commit is contained in:
parent
a5816f02eb
commit
e8a69508c9
1 changed files with 13 additions and 5 deletions
|
@ -1,22 +1,30 @@
|
||||||
# zsh
|
# zsh
|
||||||
|
|
||||||
> Z SHell, a Bash-compatible command-line interpreter.
|
> Z SHell, a Bash-compatible command-line interpreter.
|
||||||
> See also `histexpand` for history expansion.
|
> See also: `bash`, `histexpand`.
|
||||||
> More information: <https://www.zsh.org>.
|
> More information: <https://www.zsh.org>.
|
||||||
|
|
||||||
- Start an interactive shell session:
|
- Start an interactive shell session:
|
||||||
|
|
||||||
`zsh`
|
`zsh`
|
||||||
|
|
||||||
- Execute a command and then exit:
|
- Execute specific [c]ommands:
|
||||||
|
|
||||||
`zsh -c "{{command}}"`
|
`zsh -c "{{echo Hello world}}"`
|
||||||
|
|
||||||
- Execute a script:
|
- Execute a specific script:
|
||||||
|
|
||||||
`zsh {{path/to/script.zsh}}`
|
`zsh {{path/to/script.zsh}}`
|
||||||
|
|
||||||
- Execute a script, printing each command before executing it:
|
- Check a specific script for syntax errors without executing it:
|
||||||
|
|
||||||
|
`zsh --no-exec {{path/to/script.zsh}}`
|
||||||
|
|
||||||
|
- Execute specific commands from stdin:
|
||||||
|
|
||||||
|
`{{echo Hello world}} | zsh`
|
||||||
|
|
||||||
|
- Execute a specific script, printing each command in the script before executing it:
|
||||||
|
|
||||||
`zsh --xtrace {{path/to/script.zsh}}`
|
`zsh --xtrace {{path/to/script.zsh}}`
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue