From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22313 invoked by alias); 22 Feb 2015 23:41:05 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19889 Received: (qmail 22962 invoked from network); 22 Feb 2015 23:41:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=X+5rdgje c=1 sm=1 tr=0 a=2VOmuY/DTsTYmU+TN/zbfg==:117 a=2VOmuY/DTsTYmU+TN/zbfg==:17 a=VNsaWKQvMhEA:10 a=N659UExz7-8A:10 a=WxPJkoYbB06IdRVEZSEA:9 a=pILNOxqGKmIA:10 Message-id: <54EA6200.1040007@eastlink.ca> Date: Sun, 22 Feb 2015 15:10:56 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.4.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: ANSI bg colour outside of prompt area References: <20150222132310.GA18377@wintermute> <150222111007.ZM18687@torch.brasslantern.com> In-reply-to: <150222111007.ZM18687@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 02/22/2015 11:10 AM, Bart Schaefer wrote: > } In zsh, the background color gets reset once the characters have been > } printed. > > That's intentional so that a misbehaving program can't e.g. cause your > prompt to become invisible by changing the background to the same color > as your prompt foreground. > That makes sense, and I suppose, as you say, the more direct thing is to manipulate the terminal, tho that means a restart anytime you wanted one of those color changes, and my xfce4-terminal doesn't seem to permit command line color changes anyway. But to the extent that zsh supports color, shouldn't the colors stay set until they are explicitly changed? I see in bash: echo -e "\e[41m" red red red echo -e "\e[0m" normal normal normal I get exactly what I ask for--when I want to return to defaults, I say so. So, would it be possible to have, say, an option to stop ZLE from clearing the screen as it does? I can see that the zsh way is safer, but being able to turn it off sounds like a cool option as well, and friendly to our bash converts besides.