From owner-freebsd-questions@freebsd.org Wed Oct 12 17:24:33 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FD37C0F108 for ; Wed, 12 Oct 2016 17:24:33 +0000 (UTC) (envelope-from stoa@gmx.us) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A63138D6 for ; Wed, 12 Oct 2016 17:24:32 +0000 (UTC) (envelope-from stoa@gmx.us) Received: from archlinux.localdomain ([97.66.215.44]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0M9s8K-1bjLiX2z9M-00B6kX for ; Wed, 12 Oct 2016 19:24:30 +0200 Date: Wed, 12 Oct 2016 12:24:19 -0500 From: Dutch Ingraham To: freebsd-questions@freebsd.org Subject: Re: $PS1 does not render command-line prompt in color in a FreeBSD VM Message-ID: <20161012172419.GA18676@archlinux.localdomain> References: <208d3ae0-78ea-853f-6c48-6a74e1d61253@verizon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <208d3ae0-78ea-853f-6c48-6a74e1d61253@verizon.net> User-Agent: Mutt/1.7.1 (2016-10-04) X-Provags-ID: V03:K0:fkY/d6wCmZeB52KGU6Yn11qR/TzFuo2s4MDHWQYtIr4fW34j+42 phQHtT5Z+ZYjX/1BnR4uE/T8fZWrlw4hUBdQ40nxKY8NFxUYpGU4GKSDBUEeY6mECBpZloG kVfOBRn0xyXGWK97Athf0yuYoRoaRqcXEweQZMUNQ+8JZjl0m+R1SOnkgIuV/pc5uKAcw9j FX3t0+fJFuLBZBviYh2qA== X-UI-Out-Filterresults: notjunk:1;V01:K0:LRSVIq99+mk=:9Ue4BLHXtr4tI+d6HnRLhF lqm9Z7iebvbRPwzDB2TqULEveAhnshzKKSTj1uRh4MHUbEXIA9fql9W24wJGxb1wT+FKl8jJ7 OYWYw0J+j8V4Ott+8wpdBiw+AZjNW1+NilwfZt2vhLh3Ki+3pZ/pDsJhbah5QVDn/YUhE4muq rVK8YwiM+jGjn0rLK+0DWmOhyrrAJX3RzQDgjfXVvHEMLeNb5V2NYzeEfTJCItTktIjw78+9g CDzn4uwIjI3CgisFoRmboR7NLU2RQS860znoIvDkvchYZkixvZ11bKoJ2H+nJqz5i1bqTjFZZ 0e/PwIfFDc9zRIH4g9rvYARYlmmPR0Mr3vhkQ9S14ZGPa9rSToryF8PEAVi7ujMy3mkG1VDIG EY5ivQ+Lm4rTG5tbV8z94PpuJyU/1g0jnBduGRYMG/PPlYNkYZmfaSUb4uRXz7eYRhvGh7haV zx/mGYnx9G4TUVeOS2+vZv5LIyHqUPUT/h1owBxacLRHDE8BTZ23eqWHnWk2qnURhiTVs0ZEo IQhJmna7NpFNiTQ87P3lOarO37i2tvfZ2DcnWiagqxuHAD4Nh1hLrWpwGSDx7gINV85k0zhAK 8HCP12tgpO+pvpCfhbZcV/ZxphbLMUaLuATUoGY659YsliBLgB0zu7a9TRZwwidzJ97LBYYTv 2FNXpRmE3jbSv7a0XyEM3qpC7oFpkq/LIGguo4+fZ6Eb+G+LGn9jmrmmOwMD7NPtExUWDD/kA vPu+NU/sMDnf13i5k16JCuX7yQikkhNFtJN55f+nadJeYogpWS1O+482sr0= X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 17:24:33 -0000 On Wed, Oct 12, 2016 at 01:09:50PM -0400, James E Keenan wrote: > On 10/12/2016 12:16 PM, Roger Pate wrote: > > On Tue, Oct 11, 2016 at 9:56 PM, James E Keenan 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. > > > > The files were wrapped in a tarball and scp-ed. The control characters in > the assignment to PS1 did not get stripped. I examined them via 'od -c' on > each VM and the control character 033 is present where expected in both > cases. Just to confirm it has nothing to do with the transfer of the config files or the VM, I have a similar $PS1 scheme, also using sh as my shell, and have the same problem after upgrading from 10.3 to 11; this all on bare metal upgraded in-place, no file transfers needed. I haven't had time to debug yet, just wanted to get this out there to confirm this is not a local issue.