From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16981 invoked by alias); 25 Mar 2013 17:45:57 -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: 17738 Received: (qmail 4088 invoked from network); 25 Mar 2013 17:45:10 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130325082938.ZM24580@torch.brasslantern.com> Date: Mon, 25 Mar 2013 08:29:38 -0700 In-reply-to: Comments: In reply to seanh "Re: Outputting colored zsh prompts from an external script" (Mar 25, 2:05pm) References: <20130324192345.GA20437@kaeru> <871ub431wq.fsf@gmail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: seanh Subject: Re: Outputting colored zsh prompts from an external script Cc: zsh-users@zsh.org MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Mar 25, 2:05pm, seanh wrote: } } So far this color issue is the only thing getting in my way... Your python script needs to either output %F{color} / %K{color} instead of the raw ANSI sequences, or (might be easier) put %{ and %} around the ANSI. Both methods tell zsh that this output is "zero-width" on the terminal, so it doesn't count those bytes when determing how much screen space the prompt uses. See also %G in the manual. -- Barton E. Schaefer