mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
Add documentation for wait command
This commit is contained in:
parent
bc28bd7d6d
commit
1014995159
16
doc_src/wait.txt
Normal file
16
doc_src/wait.txt
Normal file
@ -0,0 +1,16 @@
|
||||
\section wait wait - wait for commands to complete
|
||||
|
||||
\subsection wait-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
wait [-n | --any] PID...
|
||||
\endfish
|
||||
|
||||
\subsection wait-description Description
|
||||
|
||||
`wait` waits for child processes to complete. If a pid is specified, the command waits for that pid. If no pid is specified, the command waits for all background processes.
|
||||
|
||||
If the `-n` / `--any` flag is provided, the command returns as soon as the first subprocess completes. If it is not provided, it returns after all subprocesses complete.
|
||||
|
||||
\subsection wait-example Example
|
||||
|
||||
`sleep 10 & ; wait %1` spawns sleep in the background, and then waits until it finishes.
|
Loading…
x
Reference in New Issue
Block a user