From owner-freebsd-questions@freebsd.org Wed Oct 12 17:10:08 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 3D84FC0FD3A for ; Wed, 12 Oct 2016 17:10:08 +0000 (UTC) (envelope-from jkeen@verizon.net) Received: from vms173021pub.verizon.net (vms173021pub.verizon.net [206.46.173.21]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 233F7C44 for ; Wed, 12 Oct 2016 17:10:07 +0000 (UTC) (envelope-from jkeen@verizon.net) Received: from vz-proxy-m008.mx.aol.com ([64.236.83.1]) by vms173021.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0OEY009292CFX000@vms173021.mailsrvcs.net> for freebsd-questions@freebsd.org; Wed, 12 Oct 2016 12:09:51 -0500 (CDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=EKN26xRC c=1 sm=1 tr=0 a=IfeYs1eZmZ/JIJO4DN4ZPw==:117 a=IkcTkHD0fZMA:10 a=CH0kA5CcgfcA:10 a=o1OHuDzbAAAA:8 a=T0n4mNrM2sNB3DeJJRAA:9 a=QEXdDO2ut3YA:10 Received: by 71.246.118.77 with SMTP id 56559826; Wed, 12 Oct 2016 17:09:51 GMT Subject: Re: $PS1 does not render command-line prompt in color in a FreeBSD VM To: Roger Pate References: Cc: freebsd-questions@freebsd.org From: James E Keenan Message-id: <208d3ae0-78ea-853f-6c48-6a74e1d61253@verizon.net> Date: Wed, 12 Oct 2016 13:09:50 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit 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:10:08 -0000 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. Thank you very much. Jim Keenan