$PS1 does not render command-line prompt in color in a FreeBSD VM
roger at qxxy.com
Wed Oct 12 16:16:52 UTC 2016
On Tue, Oct 11, 2016 at 9:56 PM, James E Keenan <jkeen at verizon.net> wrote:
> This question concerns display of colors in the command-line prompt on two
> different FreeBSD installations.
> ... which in the terminal looks like:
> [jkeenan] $
> where 'jkeenan' is in red and all the rest is in white. So far so good.
> Yesterday I installed FreeBSD-11 as a VM on the same Linux host -- only this
> time I switched to using VMWare to house the VM. I brought over my
> .profile, .shrc, .vimrc, etc., files from the 10.3 VM to this new one. I
> expected them to Just Work. However the terminal inside the VMWare console
> seems to be unable to digest the codes for color in the assignment to $PS1.
> That value for $PS1 is rendering as:
> [[31mjkeenan[0m] $
> ... all rendered in white; nothing in red. The control sequences to change
> from white to red and back again are simply being literally displayed.
How did you "bring over" your files from one VM to the other? Did
your escape characters get stripped? If they did, that would explain
what you see.
More information about the freebsd-questions