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,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14696 invoked from network); 27 Aug 2023 08:35:53 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Aug 2023 08:35:53 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1693125353; b=YOBydlLgvTGzUaC/n71hzSMPQX9Cp3ZvoUggLsaG1/4VQEcRTIlSKp6MqVWfVyana3OonljMu1 Y6TXT5HGn4aOdQ7cEPTyxWi5MSPOZryP0UlKCRbeeln5CECe3hSdQSC5L+g2/sr4lLLRUlzw/j k9oap8besPtbfj0oSFvQQtedrNxK7kUAxXlNgOdq9XwA9OISEcmSQCton3cwDbLo0DZrdeZ1zd 7gyeakPLroBGTYn+g4X2Q7hN7l5T5MDLy0/4OMbI/lJjPukEtkGTHt8p2Hu4ijuaFrPfDaNWnW 2UMzYXrOwr7/i6vrbYr4w61NGse+LHXbx5QCV9MYeVo/mQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f179.google.com) smtp.remote-ip=209.85.208.179; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1693125353; bh=XUrTNM8VSsTrSJYUNil6oNtjd2V9qXl0kAGQO23QhAc=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=UcZOINP5T+Cv/SvLpbHgFlZyuzmrbDtZjC0edZ/Jf4yjSWxyOK1zVIgqF8V939C+Bk5ZDuGRJB 59te91BQTzVRV4Ch5RB4ekSkuolE+rsUftaPUu82lviY8xRfKyEiP19MaGYiJwa6nEFURsjzgN dCENQj1RrLfHEmMXmxZFmqQ80muLK4dX+7CVavntMEel9uQ5hcxPFfxTaiDZS1oJd/r6rwFqnG cu/4p3sXSATpELIUtVrwhJDdfrRIqtF7uORPiX16wDz1ZL0zfmx3Z6EvSHoNlyg/JNamOz/F+O 3/fIoIV2KNtdMOvBVY/MCqQge9WuTfCpqXUj8Qea86Uzww==; 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:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=iuZkkQGahq9DjzKsJJ6QyCuFfJF9JeNjELkcXFO7Ux4=; b=jlNITzHC8ai2/zzDPLZ38vKlPR r9s0DM5vVev4mYy0jSRSVAw64EszcyP6/yN5uq6/d6X1ajZcg0s6Vc3rkrGway9Rv7eSVLKANDLLZ OU4wGuJ346wFBkH1Mj2WyiZ97quz2b/THU908uYGd82k3gTK006QYLWhpC4dVdyaDA8xRWSxiuOuy aXNSHGwwELUQv2A9LWknLQ7pozvaluMDke66Z8NnAUPjWD/xrz0/UB8sHSoIk45tHXvEqbOJFZjC8 Brzsg+xJ8oWbVsU1CMc9xrY1d6cj+OFwp/Sr0AK2EcSG8R0rap9Q5BWe4BTZ1R2D/Bj7l+WKs/Vui bqZhcVew==; Received: by zero.zsh.org with local id 1qaBFQ-000How-Q2; Sun, 27 Aug 2023 08:35:52 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f179.google.com) smtp.remote-ip=209.85.208.179; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f179.google.com ([209.85.208.179]:49417) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qaBEc-000H7E-FZ; Sun, 27 Aug 2023 08:35:07 +0000 Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2b9d07a8d84so32706351fa.3 for ; Sun, 27 Aug 2023 01:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693125301; x=1693730101; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iuZkkQGahq9DjzKsJJ6QyCuFfJF9JeNjELkcXFO7Ux4=; b=KDImb8Z+DzcsEVtaC0OpZZ5ZhcYSwSLWjdXYJCNOGJGXlaQhyvx0jpN9yWuncYA2+R gR9R4M/Lqd7Klj/QaFII4DVSY4FhJjOxwTVGxJ1jhiCjpwOxDuvGa3CfwC0qDJDmo6tz 4adQSfrzvqtrTCq4/pROQuVkh4HT4jNaEeCAgfXu+K9mZ3txElcJi+03LpJnNUmi78vS Ax1+DPngV4gdZqA2mXuR6/PprrRrnnnu3gF/tdCD8uS3SV3EiaopAJrsLI0Pri5YeYcB GDXymqthPAWIXRBV4t6UjLduqbxPYmzWt0Y77aj7jBK9i2hIV98jUIHXO+JqV4cN3KVH WB2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693125301; x=1693730101; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iuZkkQGahq9DjzKsJJ6QyCuFfJF9JeNjELkcXFO7Ux4=; b=aHg7UsntpguV9s6a4/zuE6ijG8y3VojB9440z1QWsLDzypBJMKq0Y8/yHlGb65w/MW gjdq1Ia6qlL8OzOcPQJE+6go/GE/JuLV6rLSFsN1nvhgqlepfmmWzFf6q1rhqSyo/+qV hg38ZsaAY/yCcKiJqZ72qNukyRYoW29WDo6ntzkFcNE7OB0acjelA4h3UXlhncNqNR5c tMLPWc+vLFBxhfBddiqQszwLn3FI5w12pmG0SIhe8Zml0YNhWqVAcfa8xvmMxXDu+jLz BWrrZWJy22d+4/l1i0fun9cmpru57eHJ6ixbIOZa0OoSpgof9hU4CjN9CVp1PXUXSbUq n8LQ== X-Gm-Message-State: AOJu0YyS+kt6OUkxtNTC7GtAe92zQFH/KjJ8MXzWuTNJXrSBOoXZkpTx L36ymyFp4RGB7l2PwEpgbkbKaT5Q8PFQ01SxWkg= X-Google-Smtp-Source: AGHT+IHi1GPd/Kfr6R6UfdOaAsysVRqrU17dOuSYl3LA8K7rOrvLONxLlM+GFekJ3jQ8lfD2DnOvDljvnTrZpPcQLds= X-Received: by 2002:a2e:a4b3:0:b0:2bd:e3e:1a23 with SMTP id g19-20020a2ea4b3000000b002bd0e3e1a23mr72003ljm.45.1693125301173; Sun, 27 Aug 2023 01:35:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Sun, 27 Aug 2023 10:34:49 +0200 Message-ID: Subject: Re: Why does zsh clear to end-of-screen after prompt? To: John Hawkinson Cc: Bart Schaefer , zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 29211 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: On Sat, Aug 26, 2023 at 3:00=E2=80=AFAM John Hawkinson = wrote: > > In case it wasn't apparent, the use case is I had a small ad hoc > script that produced ~20 lines of key/value output and sometimes > the values change and I'd like to keep them in the same position on > the screen and just overwrite themselves when they change if I > rerun the script with up-arrow/RET. An alternative solution is to embed the info in PROMPT. In order to avoid wasting 20 lines of the TTY real estate on each command, you can automatically contract the prompt before executing each command. Thus, if you run `pwd` twice in a row, your TTY might look like this: me@box ~ % pwd /home/me me@box ~ % pwd /home/me foo=3Dbar baz=3Dqux me@box ~ % =E2=96=88 In this approach the extra info ("foo=3Dbar", etc.) is always displayed right above the current prompt. This is basically Transient Prompt from Powerlevel10k (https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/trans= ient-prompt.gif) but with a fatter prompt. Roman.