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=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2291 invoked from network); 31 Dec 2022 13:14:13 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 Dec 2022 13:14:13 -0000 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:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=XaKbZK4ZD4avBcTkkrZNxon92jziUOBB9DRJV9rV34g=; b=J3KBC9gTdtEl42pXSy6wJ7UiMR K5DTVs3sTnA9fttPXFanG1OQmrP9FWlBS1ZQhoWE0BmM3nxAG6xu/XS5Ea+Lt8t2YQLF7jL7bLZRN FrTt8ETOdEgGsq3oUaEPO6m1w9GYPFqdQSJfkxUJDEuHg1rVHuFVT34vZsxtEdehYyw29pYbl6D9I RALJKheYfRY0rb5o9ZWbWNthqhGo8Z/MbOdurp+fAKF7eYPRbvhUD8AvtObfczI1UzWNCEBWtu27c 8ioCxoW+T0ls3zY58p+ASYXkBiSjY0tlakPx7/11d2HQub90F/EBrNFGZNwpu0CrQrkPHB80tf1nh 1EJz0fNw==; Received: by zero.zsh.org with local id 1pBbgh-0009tK-6r; Sat, 31 Dec 2022 13:14:11 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pBbg8-0009Z5-CB; Sat, 31 Dec 2022 13:13:36 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1pBbg7-000Mf0-Iu; Sat, 31 Dec 2022 14:13:35 +0100 In-reply-to: From: Oliver Kiddle References: To: OG Code Poet , Zsh hackers list Subject: Re: Read a line from user without clearing screen below the prompt while allowing user to use arrow keys to make edits in middle of line MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <87108.1672492415.1@hydra> Date: Sat, 31 Dec 2022 14:13:35 +0100 Message-ID: <87109-1672492415.579439@wMHr.mGJl.BpB2> X-Seq: 51268 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: Bart Schaefer wrote: > If this is unsatisfactory, you could try using zcurses to manage the > display, which I think would allow you to always redraw whatever vared > erased. The first idea that came into my mind was to try setopt singlelinezle Unfortunately, that doesn't especially help. I think the clearing from the cursor to the end of the window serves a purpose in general. It may be that this could be relaxed for singlelinezle without breaking anything. A script has control of anything like completion that potentially results in further printing of characters. Another option would be to provide zle with control of the text you want to appear after the input by putting it in POSTDISPLAY: other-stuff() { POSTDISPLAY=$'\none\ntwo\nthree' } zle -N other-stuff vared -i other-stuff -c out Oliver