From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23479 invoked from network); 21 Aug 2023 23:38:04 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 Aug 2023 23:38:04 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1692661084; b=dLa3tN6vVfVg/gkoHTcHBgRIcMxO5vz+uA9aaIcpSIiHBhrWMMM2FQEIgV3oVU8eIN0b4L4c1Y rNbHhvKofR1k8IG5o1y8+ys5j4YhvuEROdL0x4fK/tY9v+HgXKygLBiN60xKkrPhzlMhGvxJtw hznTX5DasXlHnb2L9X9Q9jbIsVD3pl+k7rcLbkEIkBKhcGGaqhCS/P9r9AqA/WhUV0qf3EVGas LDg47YEBEbOP1JTR5pDGz8DzPkKtlOrjm4Pyxgb4RTb3UEnN5g3s5QKPFqetB/lVqGuo+9k5yi x5wHQ/9BHacN3I2at2N6mJOXDpDVDocEtgLT/rCLHhtJSg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (tncsrv06.tnetconsulting.net) smtp.remote-ip=45.33.28.24; dkim=pass header.d=tnetconsulting.net header.s=2019 header.a=rsa-sha256; dmarc=pass header.from=tnetconsulting.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1692661084; bh=WETDD4Lmds0Fuu+huv++oZZeylHAxANQOnZB3DQJQnw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature: DKIM-Signature; b=ASj5LSGhkMA0kQYRMDD1AnpXX//4PmGDRYMU9F8thhP05RE7VrpW61rwIcYHjdgn5Lm3tHYFKn uOdXiX7FgfIT7r6WHpKcle1ZS7Bl+T12UiFKnBklRKW6YfD7XMwMazqPlsIVsWQp/7L44MpOb9 9/+mMSat3zPtf57OZbQkgMspbSy1mWVBsWFVXL5oqXZLLY5eaUXgrQb+xZWoAgUkff2Uj52Ouy xZDK8WjjRvYbIZs8jRW9XYnHdbSX6+YnLqshGSK/Dh/gF8EhVBkuzJBQhnlzko2vKZ2inVz0x0 H6kQYrNGOswTY0HFwSfpooHtWPWp+T+l0I9L3VG/LJjoXg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=SGXO7hx8SNKX1Tbut8QD0zt27Bgnv41tenurvgE/lDQ=; b=P7pZmdMWYvtqPxCxXq3CtaQ3vT 2O5hD897FLaemWyJnAQx5dPi76TemQhBOjdK9cr6xwyCnhhSWV/SOp9LGPKvNTQ6g5dpTbRKsBrBa snLsb0MqkSzvCNn8uM0+bxvIwNwT0fqYrTHhX5A0liZ6DL2IuB7oKQLFGTGOh1IdS90e6e+UtCqnr W+gSSgOiVPwvcEepCTRPKUzzEdp44UDyZmnu7MKlI53N/jksBOBjL676keeyWQzZ66GbaSq/BnRhX Ln66h/fkXdqkrHkTrn/EQFGwj4B25ABgcvgqO7zN7J4D0kGj0G6w3qa7gSPA0xZvMhBGB5J0Ao23f Q78WJ7Kg==; Received: by zero.zsh.org with local id 1qYETB-0003bZ-64; Mon, 21 Aug 2023 23:38:01 +0000 Authentication-Results: zsh.org; iprev=pass (tncsrv06.tnetconsulting.net) smtp.remote-ip=45.33.28.24; dkim=pass header.d=tnetconsulting.net header.s=2019 header.a=rsa-sha256; dmarc=pass header.from=tnetconsulting.net; arc=none Received: from tncsrv06.tnetconsulting.net ([45.33.28.24]:47436) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1qYESH-0002sf-FL; Mon, 21 Aug 2023 23:37:13 +0000 Received: from Contact-TNet-Consulting-Abuse-for-assistance by tncsrv06.tnetconsulting.net (8.15.2/8.15.2/Debian-3) with ESMTPSA id 37KFt6ZS020002 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 20 Aug 2023 10:55:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tnetconsulting.net; s=2019; t=1692546906; bh=SGXO7hx8SNKX1Tbut8QD0zt27Bgnv41tenurvgE/lDQ=; h=Message-ID:Date:MIME-Version:User-Agent:Subject:Content-Language: To:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:Cc:Content-Disposition:Content-Language: Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To: Message-ID:MIME-Version:References:Reply-To:Resent-Date: Resent-From:Resent-To:Resent-Cc:Sender:Subject:To:User-Agent; b=l01k2C4VVEnMEGX6ZDrQ97B+G5hLWRPz/NUPCmwgbn0prJUYuYzZuYmLGPQQyjFWZ N/lkNJWeiL4c4SqDMMO8zXgl0agndUDMCspYhl0JjPYYeERui6I886wS/N4TN9GpN/ +K6AHWtQumrboin5VdHFJBH0LPhCLYn0fo0l6Oqs= Message-ID: Date: Sun, 20 Aug 2023 10:54:58 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: Help fix Zsh shell command prompt error or stranee Content-Language: en-US To: zsh-users@zsh.org References: From: Grant Taylor In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Seq: 29176 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On 8/20/23 1:30 AM, Roman Perepelitsa wrote: > In the vast majority of cases one can replace %{...%} with a > first-class %-sequence. I question the "vast" quantifier. > For example, instead of %{\033[31m%} one canuse %F{red}. Zsh has many SIMPLE PROMPT ESCAPES and CONDITIONAL SUBSTRINGS IN PROMPTS -- see zshmisc and / or zshall manual pages. But they all seem to be specific to what appears on the prompt line(s). This starts falling apart when you print terminal control characters / escape sequences used to alter the terminal window title or re-define the default terminal background / foreground colors and / or resize / reposition the terminal window itself. N.B. there is very much so a difference in re-defining the terminal's current default vs specifying colors in the actual output. Zsh has the most feature rich prompt support that I remember seeing. But even that doesn't cover all the things that I do. Hence why Zsh includes the %{...$} and even the %G to alter how Zsh does or doesn't count characters output to the terminal. Grant. . . .