Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Why does zsh clear to end-of-screen after prompt?
- X-seq: zsh-workers 52160
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: Why does zsh clear to end-of-screen after prompt?
- Date: Mon, 18 Sep 2023 16:32:52 -0700
- Archived-at: <https://zsh.org/workers/52160>
- In-reply-to: <23391-1695078881.417127@hXqK.BiYQ.sk8c>
- List-id: <zsh-workers.zsh.org>
- References: <ZOkGi5f6hPuk_1-b@louder-room.local> <CAH+w=7ZQaJgvk=wLX5mVEC4XR3AP1kxZU+t6O88PZFAZ6p6w9Q@mail.gmail.com> <ZOlOaISfwY6RFrfH@louder-room.local> <CAH+w=7ba2eATAi3enewDJfwr5NVo0PPb0EtD8b_DKzeFFxXa4g@mail.gmail.com> <23391-1695078881.417127@hXqK.BiYQ.sk8c>
On Mon, Sep 18, 2023 at 4:14 PM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> [ moved to -workers ]
> On 9 Sep, Bart Schaefer wrote:
> >
> > no_clr_eos () {
> > emulate -L zsh
> > if [[ $1 == cd ]]
> > then
> > REPLY=""
> > elif [[ -n $2 ]]
> > then
> > REPLY=$(echotc "$@")
> > else
> > REPLY=$termcap[$1]
> > fi
> > }
>
> The last 6 lines just restore what would be the default behaviour,
> right?
That is correct. Although if I were writing it for the current dev
revision, I'd probably just use
else REPLY=${ echotc "$@" }
since there'd be no subshell.
> Wouldn't it perhaps be helpful if there was an explicit way to fallback
> to the default such as by returning an error status.
Yes. Or even just by "unset REPLY".
> The feature is
> mostly only used by the test suite to my knowledge.
It's used in X04zlehighlight. I think there was a proposal to use it
in another test as well, but that never got done.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author