From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7442 invoked by alias); 1 Aug 2014 12:21:54 -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: 32932 Received: (qmail 7991 invoked from network); 1 Aug 2014 12:21:53 -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.1 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=VtiTC2XRkt22FsURzzJgmRSINHMDzBI5ummZBL/9pMM=; b=cJGbkKtOJkpNgJ1by6x88bQl5Gx3sa+kxgLyELgoZniixklX6YWHo5J1CWWMUwuFva X9mlWMBeimRTGmwu2ugRQWc6s67kFrE3tY01V8m5inPFjVee68rj/M0FIorQAAc1IDd2 rXZDefY0xvniNlZ0BujniUzGpqZlug2lapJzh7Y7KrJDLDcZkh7jTzoPcFzzmyxXtAow btJvYEwtUByGmELgVWdZuUalbRxo+4vWn2VyJeiR7JppuMNSorRvyrCZh7Gw1wZx4DKE 2tkPDqnTVGyfjQadSkk5Y5FH25weTJDulx1XK1LsoP28mlUWEb4MWNtTGshft8/oTKQv A1ig== MIME-Version: 1.0 X-Received: by 10.52.137.2 with SMTP id qe2mr3455466vdb.11.1406881225825; Fri, 01 Aug 2014 01:20:25 -0700 (PDT) Date: Fri, 1 Aug 2014 05:20:25 -0300 Message-ID: Subject: Possible bug to RPROMPT From: "Felipe G. Silveira" To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=bcaec51b161bb4e40904ff8d0f3e --bcaec51b161bb4e40904ff8d0f3e Content-Type: text/plain; charset=UTF-8 Hello, I've been tinkering with zsh for the past couple weeks, and I'm loving it! But I think I hit a bug regarding the RPROMPT definition. Since I setup my PROMPT so the information comes in one line and my cursor below it, I was trying to align the RPROMPT to always appear 1 line before where it generally is printed. This is a bit confuse, but hopefully everything will clear up with an example. So, lets suppose I have: PROMPT='a lot of cosmetic and information stuff here. {colors} > {reset colors}' So I have a 2 line definition. this works fine. so I tried RPROMPT='< [current time]' this works, BUT it's one line below form where I want it. so after some tinkering, I decided to try some escape commands: PROMPT=$'\e[s'$'\e[1A''< [clock] ''$'\e[1B'$'\e[u' Where: $'\e[s' - Save current cursor position $'\e[1A' - go back one line up <> $'\e[1B' - go one line down $'\e[u' - Restore cursor position It worked! But... The cursor ends up on the far left side of the screen, before any characters that are already printed. (so, in my example, it would be before the > printed by PROMPT). So.. is this a real (possible?) bug, or did I "abuse" too much from the prompt parameters and broke it ? Hopefully it's something that can be fixed! Thank you in advance! -Felipe --bcaec51b161bb4e40904ff8d0f3e--