mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Merge branch 'prompt-err' of github.com:scopatz/xonsh into scopatz-prompt-err
This commit is contained in:
commit
8fb90853ea
1 changed files with 9 additions and 2 deletions
|
@ -102,12 +102,19 @@ class BaseShell(object):
|
|||
"""Obtains the current prompt string."""
|
||||
if self.need_more_lines:
|
||||
if self.mlprompt is None:
|
||||
self.mlprompt = multiline_prompt()
|
||||
try:
|
||||
self.mlprompt = multiline_prompt()
|
||||
except Exception:
|
||||
_print_exception()
|
||||
self.mlprompt = '<multiline prompt error> '
|
||||
return self.mlprompt
|
||||
env = builtins.__xonsh_env__
|
||||
if 'PROMPT' in env:
|
||||
p = env['PROMPT']
|
||||
p = format_prompt(p)
|
||||
try:
|
||||
p = format_prompt(p)
|
||||
except Exception:
|
||||
_print_exception()
|
||||
else:
|
||||
p = "set '$PROMPT = ...' $ "
|
||||
self.settitle()
|
||||
|
|
Loading…
Add table
Reference in a new issue