From owner-freebsd-questions@freebsd.org Tue Oct 18 21:50:20 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 D4134C171E3 for ; Tue, 18 Oct 2016 21:50:20 +0000 (UTC) (envelope-from jkeen@verizon.net) Received: from vms173013pub.verizon.net (vms173013pub.verizon.net [206.46.173.13]) (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 B8B1BD9 for ; Tue, 18 Oct 2016 21:50:20 +0000 (UTC) (envelope-from jkeen@verizon.net) Received: from vz-proxy-l003.mx.aol.com ([64.236.82.155]) by vms173013.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0OF90013YGIT58A0@vms173013.mailsrvcs.net> for freebsd-questions@freebsd.org; Tue, 18 Oct 2016 15:49:42 -0500 (CDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=JcfMlQCV c=1 sm=1 tr=0 a=i+tV1o3iWEoTTvx3QNPGxA==:117 a=N659UExz7-8A:10 a=CH0kA5CcgfcA:10 a=o1OHuDzbAAAA:8 a=6I5d2MoRAAAA:8 a=iqholuFDcU3OJtgM8UUA:9 a=pILNOxqGKmIA:10 Received: by 71.246.119.222 with SMTP id 02a19840; Tue, 18 Oct 2016 20:49:42 GMT Subject: Re: $PS1 does not render command-line prompt in color in a FreeBSD VM To: freebsd-questions@freebsd.org References: <208d3ae0-78ea-853f-6c48-6a74e1d61253@verizon.net> <20161012172419.GA18676@archlinux.localdomain> From: James E Keenan Message-id: Date: Tue, 18 Oct 2016 16:49:41 -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: <20161012172419.GA18676@archlinux.localdomain> Content-type: text/plain; charset=windows-1252; 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: Tue, 18 Oct 2016 21:50:20 -0000 On 10/12/2016 01:24 PM, Dutch Ingraham wrote: > 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. It clearly is a bug and has been reported here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211360 I've entered a comment in that bug ticket to the effect that this is a regression with respect to user-friendliness. If you share that opinion, please feel free to enter a comment there. Thank you very much. Jim Keenan