Skip to content

make colour code escape sequence in SetupProject compatible with zsh

Paul Seyfert requested to merge pseyfert_promptcolour into master

Following this post, colour code escape sequences for zsh need to be escaped with $'NEWPROMPT' (leading dollar, and single quote - double quote fails). A small complication enters because within these strings, environment variables don't get resolved anymore, i.e. $PS1 needs to be outside the $' ' string. Following Ben's explanation (and adding a bit try&error), I tested it in zsh and bash with:

export SP_PROMPT="yes"
cd LbScripts/InstallArea
source scripts/
export PYTHONPATH="/afs/"
export PATH=/afs/
. DaVinci v40r2

It looks fine in this quick inspection 2016-06-10-004559_1360x727_scrot

Without the addition the prompt looks like that in zsh xwindow

Comments / suggestions?

Merge request reports