mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
ignore 'sudo' in command name
This commit is contained in:
parent
4d9024d9f6
commit
71f0f69ce4
1 changed files with 5 additions and 1 deletions
|
@ -569,7 +569,11 @@ def _current_job():
|
|||
if j is not None:
|
||||
j = builtins.__xonsh_all_jobs__[j]
|
||||
if not j['bg']:
|
||||
return '{} | '.format(j['cmds'][-1][0])
|
||||
cmd = j['cmds'][-1]
|
||||
s = cmd[0]
|
||||
if s == 'sudo' and len(cmd) > 1:
|
||||
s = cmd[1]
|
||||
return '{} | '.format(s)
|
||||
return ''
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue