From 10149951597e968697e387b029059d4827d63f00 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Thu, 16 Nov 2017 11:28:32 -0800 Subject: [PATCH] Add documentation for wait command --- doc_src/wait.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc_src/wait.txt diff --git a/doc_src/wait.txt b/doc_src/wait.txt new file mode 100644 index 000000000..e729d2fb9 --- /dev/null +++ b/doc_src/wait.txt @@ -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.