In bash, if I run kill %1
, it kills a backgrounded command in the current shell (the most recent one, I believe).
Is there an equivalent of this in fish? I haven't been able to find it online in a bit of web searching.
I'm not sure if I did it wrong, but
$ ps
PID TTY TIME CMD
73911 pts/5 00:00:00 fish
73976 pts/5 00:00:00 ps
$ sleep 100
^Z⏎
$ kill %1
$ ps
PID TTY TIME CMD
73911 pts/5 00:00:00 fish
74029 pts/5 00:00:00 sleep
74121 pts/5 00:00:00 ps
fish
, have a read ofman jobs
. It's short, so easy to read. It sounds like it contains what you need.