mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
Only send the PID of the last process in a job to builtin fg
jobs -p %1 prints all processes in the first job. fg is special because it only takes one argument. Using the last process in the pipeline works for the cases I can think of. Fixes #7406
This commit is contained in:
@@ -138,6 +138,7 @@ Interactive improvements
|
||||
- The fish Web configuration tool (``fish_config``) shows prompts correctly on Termux for Android (#7298) and detects Windows Services for Linux 2 properly (#7027).
|
||||
- ``funcsave`` has a new ``--directory`` option to specify the location of the saved function (#7041).
|
||||
- ``help`` works properly on MSYS2 (#7113).
|
||||
- Resuming a piped job by its number, like ``fg %1`` has been fixed (#7406).
|
||||
|
||||
|
||||
New or improved bindings
|
||||
|
||||
@@ -226,11 +226,14 @@ function __fish_expand_pid_args
|
||||
end
|
||||
end
|
||||
|
||||
for jobbltn in bg fg wait disown
|
||||
for jobbltn in bg wait disown
|
||||
function $jobbltn -V jobbltn
|
||||
builtin $jobbltn (__fish_expand_pid_args $argv)
|
||||
end
|
||||
end
|
||||
function fg
|
||||
builtin fg (__fish_expand_pid_args $argv)[-1]
|
||||
end
|
||||
|
||||
function kill
|
||||
command kill (__fish_expand_pid_args $argv)
|
||||
|
||||
Reference in New Issue
Block a user