Skip to content

Commit cb50c79

Browse files
committed
fix: suppress spurious job indicator after command not found
1 parent de8e851 commit cb50c79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xontrib/prompt_starship.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def _starship_prompt(cfg: str) -> None:
1515
'starship', 'prompt',
1616
('--status=' + (str(int( __xonsh__.history[-1].rtn)) if len(__xonsh__.history) > 0 else '0')),
1717
'--cmd-duration' , str(int((__xonsh__.history[-1].ts[1] - __xonsh__.history[-1].ts[0])*1000)) if len(__xonsh__.history) > 0 else '0',
18-
'--jobs', str(len(__xonsh__.all_jobs)),
18+
'--jobs', str(len([j for j in __xonsh__.all_jobs.values() if j['pids']])),
1919
'--terminal-width', str(os.get_terminal_size().columns),
2020
])
2121

0 commit comments

Comments
 (0)