mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Fix bg
command behaviour (#4810)
This commit is contained in:
parent
572ebb576d
commit
57f1e4bcbd
2 changed files with 27 additions and 2 deletions
23
news/fix-broken-bg.rst
Normal file
23
news/fix-broken-bg.rst
Normal file
|
@ -0,0 +1,23 @@
|
|||
**Added:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Changed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Deprecated:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Removed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* `bg` now properly resumes jobs in the background
|
||||
|
||||
**Security:**
|
||||
|
||||
* <news item>
|
|
@ -383,7 +383,7 @@ def jobs(args, stdin=None, stdout=sys.stdout, stderr=None):
|
|||
return None, None
|
||||
|
||||
|
||||
def resume_job(args, wording):
|
||||
def resume_job(args, wording: tp.Literal["fg", "bg"]):
|
||||
"""
|
||||
used by fg and bg to resume a job either in the foreground or in the background.
|
||||
"""
|
||||
|
@ -419,7 +419,9 @@ def resume_job(args, wording):
|
|||
if XSH.env.get("XONSH_INTERACTIVE"):
|
||||
print_one_job(tid)
|
||||
pipeline = job["pipeline"]
|
||||
pipeline.resume(job)
|
||||
pipeline.resume(
|
||||
job, tee_output=(wording == "fg")
|
||||
) # do not tee output for background jobs
|
||||
|
||||
|
||||
@unthreadable
|
||||
|
|
Loading…
Add table
Reference in a new issue