Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Cursor save/restore is redrawing over existing output
- X-seq: zsh-users 26234
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Seth House <seth@xxxxxxxxx>
- Subject: Re: Cursor save/restore is redrawing over existing output
- Date: Fri, 18 Dec 2020 09:44:45 +0100
- Archived-at: <https://zsh.org/users/26234>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-12/CAN%3D4vMqnweP7nHPeMHmdnJCbNjvXxdtL-YZsMz9DcRhepmKNpQ%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-io1-f51.google.com) smtp.remote-ip=209.85.166.51; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2wEfB1+p6/7NP7PcT+e3eV8dyZlABI5HESYLXI2bemc=; b=jVowrfKyXPKrEXEGz/pYSTQT4WvZ0heMVlnYU3ndKktZGdRIYuwTU5ehFFuzGjz1J/ knP/kKgOnSbZ2bdeCbWmcQFqAWxWcGbvVagqkpCvkaSTXZq41m6Pm7/ebEERTR2FRxLN mjVgXBb54BU7bh8ctaP6mrT6x7dqd4PrWO6U6d3BVweuSsG6utlueQPVL6LyjPSq7hXC w4jLf2h9MDfU8LhxUelkFReOJOD8xfTcAIK5OGyOhJlC8IdWpNju3EXIBo3x/2JgdhuA bs40gNJQ7w8zvtuAXd22/nINDycA7mpKPko56/B/EByaxvZvqHS5YVxyT6c7xM0cofhz iNTA==
- In-reply-to: <20201218061536.GA128900@ellen>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- References: <2125772511.25490373.1608257220571.JavaMail.zimbra@eseth.com> <CAH+w=7YfGKRQyzF+gJO0nPY-s=TsoGJQ-1kXB0TwXM6a_N6EPQ@mail.gmail.com> <20201218061536.GA128900@ellen>
- Sender: zsh-users-request@xxxxxxx
On Fri, Dec 18, 2020 at 7:16 AM Seth House <seth@xxxxxxxxx> wrote:
>
> 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.
I also prefer my prompt to stay at a fixed position. However, having
command output *below* prompt is not a good idea. I've listed a few
reasons in https://github.com/romkatv/powerlevel10k-media/issues/2#issuecomment-725415740.
What I do instead is put prompt *at the bottom* and make it stay
there. The latter is a bit tricky because completion listings can push
prompt up. With a bit of work this can be changed so that completion
listings appear above prompt in a sort of temporary overlay. This
setup is quite ergonomic as it allows you to position your terminal
window so that important information (prompt and the end of the output
of the last command) is always at the same position. You can see it in
action here: https://asciinema.org/a/372068. You can also try it in
docker: https://github.com/romkatv/zsh4humans/tree/v5#try-it-in-docker.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author