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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23907 invoked from network); 18 Dec 2020 06:16:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Dec 2020 06:16:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1608272174; b=sRq8RFvVzPnk/A2ulEs1wykkGwt4st3Qo3SMZfT3K7FFB0z+KMGYCqjSXzf9zBbT3f7E3T3rfX hc/u6CVrZboyVx6s5g6uUO0NeE2Nc00yb7RkR+6UWEeNJg+6cYeoJjduXBvlUR2y+xOM0Wvu4I uLxmnoavITqr6qNSzr0pu+/C/NkhtSL0oU+1iJ7ZNRYi4X/MPpXmUeBpu/4nN91+SKfblWCe+4 pLJFwQaOCK/gm2bHVc/SMKhs3Fwg00ELpVj7NxCORdsigTTybT825EBk3mNh1bNih9leb60DhI tK7/Qyx/PHgo51rYjmQ1lJsuEJKr6YB/vFxYh1gSvdTxSA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out02.mta.xmission.com) smtp.remote-ip=166.70.13.232; dmarc=none header.from=eseth.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1608272174; bh=e3Gt5rWHKtvY1wgKZK5nxR6z31op3n3vcGe2mcUa/Hg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Subject:In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Cc:To:From:Date:DKIM-Signature; b=DS409fzoav5QXs67wZ6JRadv9a6GTyLv6gQCElPGN4DR5RonAKy938qUVqxeg/xHHOKcjNW9cr rKIB0+fmoa3vJJNvkW8leOT+OAq4yAPj02lzbkVOeAqIthUwhz2lUK4QdYiV1baGoC4nCxYed4 24t2i1QPcIBVzU7QsDeA0EWnGf/YReBwQI8RwaRPi0i5Tr2Iaqrx/LvV5r4Q1kJ9TPO1XqA0J1 bJjFUsXDCnQtJBjRq6pz3m4XRZptpWWuP51i0dRWu2wn3njVVI1scJJ7w/SPka0FbJkkOxNcTX Qnuxfyd40m+pWTcu+pAUJ/0DO9Eifft3AIZHmFUox5Idjg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Subject:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=e3Gt5rWHKtvY1wgKZK5nxR6z31op3n3vcGe2mcUa/Hg=; b=PxzrADc6614fp8iVBffG61ucil gGSG5WNIP9/8OOzdv7QboZJf7wjpFFBSpUW/PCSr+trfe3HkG61tjNRlhNvYwMb/32ov0ZOeYWK4T W124la86qKksvuLIchv0qqeDNOhPeFAVm7DZ6elwIgHMXx5qSWX/JDsUycHHt5xUfY+PFfv6rhQxB FQYFLgyngQhef824ZOBjWW/ZyyugpoLF2093nm6BYbCYBJh62MuSMFQcLAwJzDpDHSUVs2o/vYY8/ m8uXyNr/nqoqkFlEfjz6kS91nYRQXq87ye/uLm7jeQq3dm8cYQZj3HCwMKXZFm/aLkp4bxzvR+sKP iu4YTAvA==; Received: from authenticated user by zero.zsh.org with local id 1kq93l-000Ki2-T5; Fri, 18 Dec 2020 06:16:13 +0000 Authentication-Results: zsh.org; iprev=pass (out02.mta.xmission.com) smtp.remote-ip=166.70.13.232; dmarc=none header.from=eseth.com; arc=none Received: from out02.mta.xmission.com ([166.70.13.232]:39606) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1kq93G-000KLO-Jo; Fri, 18 Dec 2020 06:15:44 +0000 Received: from in02.mta.xmission.com ([166.70.13.52]) by out02.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kq93D-000lI5-VA; Thu, 17 Dec 2020 23:15:40 -0700 Received: from mta5.zcs.xmission.com ([166.70.13.69]) by in02.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kq93D-004Sti-0C; Thu, 17 Dec 2020 23:15:39 -0700 Received: from localhost (localhost [127.0.0.1]) by mta5.zcs.xmission.com (Postfix) with ESMTP id D5A741280FB8; Thu, 17 Dec 2020 23:15:38 -0700 (MST) X-Amavis-Modified: Mail body modified (using disclaimer) - mta5.zcs.xmission.com Received: from mta5.zcs.xmission.com ([127.0.0.1]) by localhost (mta5.zcs.xmission.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Tb-uaS-CC5l6; Thu, 17 Dec 2020 23:15:38 -0700 (MST) Received: from ellen (unknown [139.60.10.209]) by mta5.zcs.xmission.com (Postfix) with ESMTPSA id 5B4741280FAD; Thu, 17 Dec 2020 23:15:38 -0700 (MST) Date: Thu, 17 Dec 2020 23:15:36 -0700 From: Seth House To: Bart Schaefer Cc: Zsh Users Message-ID: <20201218061536.GA128900@ellen> References: <2125772511.25490373.1608257220571.JavaMail.zimbra@eseth.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-XM-SPF: eid=1kq93D-004Sti-0C;;;mid=<20201218061536.GA128900@ellen>;;;hst=in02.mta.xmission.com;;;ip=166.70.13.69;;;frm=seth@eseth.com;;;spf=none X-SA-Exim-Connect-IP: 166.70.13.69 X-SA-Exim-Mail-From: seth@eseth.com Subject: Re: Cursor save/restore is redrawing over existing output X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) X-Seq: 26233 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: Archived-At: On Thu, Dec 17, 2020 at 09:40:12PM -0800, Bart Schaefer wrote: > The ZLE editor presumes that the prompt is always printed at the > bottom of any output and clears the screen Ah ha! Thank you, that makes total sense. And you're right -- if I disable zle then the behavior matches Bash and sh. I haven't delved into zle yet so I'll go through those docs now. > Depending on why you're attempting to save and restore the cursor, > there may be a ZLE-compatible way to accomplish what you want. I'm experimenting with the (probably dumb) idea of only displaying the output from a single command at a time for a rudimentary TUI-like-thing. For example, if you type `ls` the directory listing appears below the prompt as normal, but then the cursor returns to the original row and clears the prompt so the next command you type, say `uptime`, outputs as normal but also clears the directory listing output. The idea being that you can run several commands in succession without moving the cursor or scrolling the terminal. Some of Zsh's completions have a similar look-and-feel to what I'm after so that may be a better tree to bark up but for now I'm just experimenting. That said, I'd very much appreciate any suggestions for where else to look.