Remove successful exit displays
This commit is contained in:
parent
4f0fe1d32f
commit
8826c0a185
2 changed files with 6 additions and 5 deletions
|
|
@ -133,14 +133,15 @@ if 'TERM' in ${...}:
|
||||||
$TAKO_SETTINGS.prompt_fields['git_branch'] = git_branch
|
$TAKO_SETTINGS.prompt_fields['git_branch'] = git_branch
|
||||||
|
|
||||||
def _return_code():
|
def _return_code():
|
||||||
code = ''
|
code = 0
|
||||||
def _set(result):
|
def _set(result):
|
||||||
nonlocal code
|
nonlocal code
|
||||||
code = result.returncode if hasattr(result, 'returncode') else ''
|
code = result.returncode if hasattr(result, 'returncode') else 0
|
||||||
|
|
||||||
def _get():
|
def _get():
|
||||||
color = 'red' if code else 'green'
|
if not code:
|
||||||
return colorize(color, str(code))
|
return ''
|
||||||
|
return colorize('red', str(code))
|
||||||
|
|
||||||
return _set, _get
|
return _set, _get
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ else
|
||||||
fi
|
fi
|
||||||
local dir="${green}%~%f"
|
local dir="${green}%~%f"
|
||||||
local branch="\$(parse_git_branch)"
|
local branch="\$(parse_git_branch)"
|
||||||
local exit_code="%(?.${green}.${red})%?%f"
|
local exit_code="%(?..${red}%?%f)"
|
||||||
|
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
export PROMPT="${prompt}"
|
export PROMPT="${prompt}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue