Disable return error code in console
eleven4y opened this issue · comments
How I can disable writes error code?
Is there a ready-made solution?
Hi @eleven4y !
There is currently no option to disable the return code for now. It could easily be done by removing $return_code
from:
# line 31
local typewritten_prompt="$virtualenv$return_code$prompt_color$prompt_symbol %F{default}"
If you want, go ahead and fork it for a quick fix.
A global option like TYPEWRITTEN_DISABLE_RETURN_CODE=true
could be added to the code for this, though.
Care to explain what the use case for this is? I might add it, as it doesn't add bulk to the prompt or anything.
It could be a useful option, since the color of the symbol might be enough for some people.
@Zalaxx @eleven4y Fair enough! Would one of you want to go ahead and do it?
I'm thinking of an option called TYPEWRITTEN_DISABLE_RETURN_CODE
to disable it.
Something along the lines of:
local return_code=""
if [ $TYPEWRITTEN_DISABLE_RETURN_CODE != true ]; then
return_code="%(?,,%F{red}%? )"
fi
Similar to $virtualenv