mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
3edb7d538f
- Error out if anything that is not a PID is given - Otherwise background all matching existing jobs, even if not all PIDs exist (but print a message for the non-existing ones) Fixes #3909.
27 lines
1.2 KiB
Text
27 lines
1.2 KiB
Text
\section bg bg - send jobs to background
|
|
|
|
\subsection bg-synopsis Synopsis
|
|
\fish{synopsis}
|
|
bg [PID...]
|
|
\endfish
|
|
|
|
\subsection bg-description Description
|
|
|
|
`bg` sends <a href="index.html#syntax-job-control">jobs</a> to the background, resuming them if they are stopped. A background job is executed simultaneously with fish, and does not have access to the keyboard. If no job is specified, the last job to be used is put in the background. If PID is specified, the jobs with the specified process group IDs are put in the background.
|
|
|
|
The PID of the desired process is usually found by using <a href="index.html#expand-process">process expansion</a>.
|
|
|
|
When at least one of the arguments isn't a valid job specifier (i.e. PID),
|
|
`bg` will print an error without backgrounding anything.
|
|
|
|
When all arguments are valid job specifiers, bg will background all matching jobs that exist.
|
|
|
|
\subsection bg-example Example
|
|
|
|
`bg %1` will put the job with job ID 1 in the background.
|
|
|
|
`bg 123 456 789` will background 123, 456 and 789.
|
|
|
|
If only 123 and 789 exist, it will still background them and print an error about 456.
|
|
|
|
`bg 123 banana` or `bg banana 123` will complain that "banana" is not a valid job specifier.
|