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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12010 invoked from network); 26 Aug 2023 01:40:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Aug 2023 01:40:02 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1693014002; b=QvIYNyO7OLbfaPPWcI+I2cNCCyCuaMlRLLc9ycorV0o5doI8QtUbvZmDQWGVmuk+2ifJViW+MZ I3h4wUkrYh4kCAbJViMMyO53GDgzDjoFtJj3N1Jc0P0fZWUopV9hjp8/wyK9joJ99qcDmKRbGC o5eXM1AtBeEFUVESOhCnKb9R+dGlbAjcPoCUYjv+pjrbSS2V39OoBFNn2i8hCcW1udAz8aL4Pb ioivG+DbAovDqTblnxnrdxzXAdrgCHV9DOK+hUUsbDYFKbUfnSSPvI84jrDT44Em6MrJWJFiZ0 rB0T3Qdvl+0Jm641CHVUQ2oxv2vKio2bgOa094i6zSAxpA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f54.google.com) smtp.remote-ip=209.85.167.54; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1693014002; bh=1o9L5Pj0rCesERXkl9kCwMAU0Vxw/1PWM40Mm3Y/Sis=; 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=rQSrjzeaP25HUHXpsDzpqpOWg8lvjNoH29eGqDgT2W6UJ4wslD3qYMii6Jmxy7agk6/UEKAiUP ukU1QrbpBaV52PPOiYuqLaqfuD1i2zXdcu4vXBN7LdrDVTXPucUEt33lNEQW23Vday91tAEN85 lEshcTmg6cikxeYLOzDjm4RjiJ+hc/FSZ8AlLVy3K2Dy5+8/gEL+hdy3jfc3rOnzBGwAEJAxi9 Rm8zBcT436nJE/GjlIQ92RV6wJYPrm9lA+0EXp14EKwVARxqIEu2ySus8yQk8JljoO6TN9ThXe PSEfUMazXYbAna3Od0Yy7KXFvb59GnCdYZ2/Pbf+Z7481w==; 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=1o9L5Pj0rCesERXkl9kCwMAU0Vxw/1PWM40Mm3Y/Sis=; b=qZzARFAcirengka2GgiCq4UO2I c+bZXDqdyIFl8RuaNYaZ0CP+Rwtj6v/zdrp0Ncw2xjRqWhpJiRVCQLcBi8nUTwtHl6UJFyh8k9YKL mkFTHCCOGaJJPF2sVNonw+KXPi+vcnpkNoX3GqWCWnvWMpiE7bkTbmMlLmDqbBfd4JAFwIbdMTB2a zyLAnMctOaZMAAUFkkniFryUVortp4CumDZ5BGZ5H45otjWCPdIHshLaX+Cv9kn9o5+kkHptGTpkH 08PtM1iwmRcA8fPgW1QyTljZehKh7Tfzm4ESEnbd7Ns0f8i92dr9pHnSAXOH6c+i1PKyqUDTpe1yO vnizfCtw==; Received: by zero.zsh.org with local id 1qZiHR-0008Gh-QE; Sat, 26 Aug 2023 01:40:01 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f54.google.com) smtp.remote-ip=209.85.167.54; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-lf1-f54.google.com ([209.85.167.54]:61499) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qZiGn-0007Ys-EG; Sat, 26 Aug 2023 01:39:23 +0000 Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-4ff09632194so2283814e87.2 for ; Fri, 25 Aug 2023 18:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20221208.gappssmtp.com; s=20221208; t=1693013960; x=1693618760; 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=1o9L5Pj0rCesERXkl9kCwMAU0Vxw/1PWM40Mm3Y/Sis=; b=K/q8Gv/VWI4LbPpQpO2o/tV+Hg2NCASMM+VbBX4miWQ9TUm7h9O2gKa4Yys9vHyqEj JNjMDFhFVP0dy7CSiSA5WnN7sLJnk2+FiR74gPFKgKq4GSZxxaTYV5zDM01ZN4PvZx4/ 0j60c3fs0u7oPRgeSDyyHaItCfGF+9QJ47prloV2aa5/o35sveIzYLiMfoOoRf92HBPU GC8Ul9U5gwwmpHov7zFdzp1xyxIWWQ5yDaXMxv+AypAi8zBiVqbtCzs64YYkWYYgId8w i2RSFtD9pDmeKtnWpvA4o1NGMPNS9nFQjw81hZunroqYHslw2VMtlMvdsLY2Zou8+6VK W7Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693013960; x=1693618760; 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=1o9L5Pj0rCesERXkl9kCwMAU0Vxw/1PWM40Mm3Y/Sis=; b=L2mwFH6VyRZSSW5QDCvaPBp0KcTHw6dcCWJvsHOzDImovSCrlNBZUpydytAjJpKyEi O0wloM+Ltj94P6FDoOwCJOfA4gsrC8aeyjWY9EBAYVwAgn4ufbIztLjBf5RU0EM6dQtX IY58v+CLdBHQNnYhokgXuTcRrXMF5edoMZlVj6zqo58/awX3jinrYgOU3ObIPHesN6BC uUS18X2Q5wQMxKb1wr1XcvoIzUgKkTs89bnywLoe90MeTjrWJ1G8QJ8oXLOvpJfieDxF 1oBaLLdQG3bRZuP8vkGRIJAmQI4cBSsXSO0twZzcZ0BcafHEGWjuEY+TAt0UtF5I+juE +1Qw== X-Gm-Message-State: AOJu0YwSi/kCOvBzu7iklHQIWwR8MvuPgNxVhmVusRFmx312Z8kbutNn ffrS4dni+FjZiPxueQcfXb68tWQnhzs6AEXlUjwZDw== X-Google-Smtp-Source: AGHT+IGgLy8REYRf2ZIYhUnvAA9th0uOHn9YJd9vhZVv6bQSZ17fVXNzBb0/C1BnGvn0K8L0STYCFR+2AkRV+XE7Tr8= X-Received: by 2002:a2e:9b14:0:b0:2bc:e2bc:81ff with SMTP id u20-20020a2e9b14000000b002bce2bc81ffmr5423790lji.51.1693013959671; Fri, 25 Aug 2023 18:39:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Fri, 25 Aug 2023 18:39:08 -0700 Message-ID: Subject: Re: Why does zsh clear to end-of-screen after prompt? To: John Hawkinson Cc: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 29200 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 Fri, Aug 25, 2023 at 5:59=E2=80=AFPM John Hawkinson = wrote: > > Ugh. I suppose it would be too much to ask that it not do this in the (fo= r me) 90+% case where neither completion nor multi-line editing have been u= sed? Maybe you're actually an audience for https://github.com/psprint/n-commodor= e ... > In case it wasn't apparent, the use case is I had a small ad hoc script t= hat 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 overw= rite themselves when they change if I rerun the script with up-arrow/RET. If it's OK for the output to be at the top of the screen and the prompt toward the bottom: preexec() { print -n $'\e[H' } You can make this conditional, e.g., only do it if repeating the same command again, or make a widget that sets the desired starting position of the output so this only happens if you use that widget instead of accept-line, etc.