-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
If a %n expansion fails, the builtins that support it via the __fish_expand_pid_args hack still run, but typically with the first job instead:
> sleep 50 &
> fg %2 # no second job exists
jobs: No suitable job: %2
Send job 1 (sleep 50 &) to foregroundsame with wait, bg and kill - in the latter case it's a bit worse because kill 1 %4 5 will run kill 1, because __fish_expand_pid_args quits at the second argument.
This is easily fixable by doing set -l args (__fish_expand_pid_args); or return in all these.
To be honest I would just add %n job expansion to the remaining builtins (and I don't think a kill builtin would be the worst thing in the world).
Reactions are currently unavailable