Atm you
always have a space between $oclr and $mee, even if $ts is $null:
echo -am $+(,$oclr,$ts)
_$mee $1-
Some possible solutions:
a) an $iif to return that space only if required:
echo -am $+(,$oclr,$iif($ts,$v1 $+ $chr(32)),$mee) $1-
b)bind $ts to $mee...
echo -am $+(,$oclr,$ts,$mee) $1-
...and have $ts return the trailing space only if it's returning a value:
alias ts { if (%showtimestamp) returnex <your timestamp> $+ $chr(32) }
c) put the color not in the text part, but as a parameter of /echo. Text now starts with "$ts" and the leading space will be ignored if $ts is $null:
echo $oclr -am $ts $mee $1-