Skip to content

Commit

Permalink
Include in the prompt the last return code if nonzero.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed May 24, 2024
1 parent 625ee3e commit 94f347c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jaraco/xonsh.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ for localf in pathlib.Path('~/.local/xonsh.d').expanduser().glob('*'):

import keyring

$PROMPT = '{env_name:{} }{cwd_base}{branch_color}{curr_branch: {}}{RESET} {BOLD_BLUE}{prompt_end}{RESET} '
$PROMPT = '{env_name:{} }{cwd_base}{branch_color}{curr_branch: {}}{RESET} {RED}{last_return_code_if_nonzero:[{BOLD_INTENSE_RED}{}{RED}] }{RESET}{BOLD_BLUE}{prompt_end}{RESET} '

def remove_mercurial_metadata():
git rm .hg*
Expand Down
1 change: 1 addition & 0 deletions newsfragments/+0f40c7f9.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include in the prompt the last return code if nonzero.

0 comments on commit 94f347c

Please sign in to comment.