From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25298 invoked by alias); 15 Jun 2013 18:45:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31477 Received: (qmail 24764 invoked from network); 15 Jun 2013 18:45:21 -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: <130615114445.ZM12286@torch.brasslantern.com> Date: Sat, 15 Jun 2013 11:44:45 -0700 In-reply-to: Comments: In reply to Mario Signorino "Re: Strange initial escape string" (Jun 15, 1:31pm) References: <130530221023.ZM11251@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Mario Signorino Subject: Re: Strange initial escape string Cc: zsh-workers@zsh.org MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jun 15, 1:31pm, Mario Signorino wrote: } } export XPIPETERMINATOR=$'\033|.' } PS1="${XPIPETERMINATOR}mario@squit $ " } } The problem is that zsh does not know anything about that escape codes and } it thinks to have written more chars than it actually has: and it sends the } carriage return too early (when I reach the end of the line). } So: how can I tell to zsh to forget those 2 or 3 special chars? Or: is } there any other way to know that the execution of the last command is just } finished? something as a "postexec()" function? As Mikael has already so tersely mentioned: PS1="%{${XPIPETERMINATOR}%}mario@squit $ " Assuming xpipe is responsible for starting the shell that runs inside the emulator, I would suggest that xpipe itself export XPIPETERMINATOR, so that zsh init files can test for it and adjust prompts.