Open andrewchambers opened 5 years ago
I just have a function in my rc file:
(defn fg
"Reload first foreground job."
[]
(sh/fg-job (first sh/jobs)))
I'll have to double check the job code to see if new jobs are put in the front or the back. I think things get more complicated when the user has lots of jobs and is swapping them back and forth.
Added (sh/fg) which simply foregrounds the last foreground job to be stopped.
Unclear what the semantics of this should be, especially when user prompts run jobs to do work.
When you background something with ctrl-z running (fg-job) with no arg may be useful. Perhaps some last-job variable may also be useful.