zsh-users
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Christian Parpart <christian@parpart.family>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: precmd hook invoked later than usual on very first prompt
Date: Fri, 5 Feb 2021 20:32:53 +0100	[thread overview]
Message-ID: <CAN=4vMrvV7MiCR07+A75fHFtnZR3nhKv8tigYhYXB8iX7o6K7w@mail.gmail.com> (raw)
In-Reply-To: <CABfObkBxZniBoXTiHdsn74fU6ZKnTySox5HJCCjsbPB54h01iQ@mail.gmail.com>

On Fri, Feb 5, 2021 at 8:05 PM Christian Parpart
<christian@parpart.family> wrote:
>
> Hi,
>
> Yes indeed.
>
> You can find it here:
> https://github.com/christianparpart/contour/blob/master/contour-integration.zsh#L36

Thanks, this does help.

The first prompt you see is not actually a prompt. It just looks like
it. See https://github.com/romkatv/powerlevel10k#instant-prompt. It's
the same trick that some mobile operating systems and web browsers use
when they show a picture of the app/website while it's still loading.

To solve your problem you can embed '\e[?2027l' and '\e[>M' in the
prompt (you can leave '\e]7;'$(pwd)'\e\\' in precmd although I would
recommend getting rid of the fork to speed up your prompt [1]). Here's
one way to do it:

    POWERLEVEL9K_DIR_PREFIX=$'%{\e[?2027l\e[>M%}'

Depending on your actual config this may or may not work. A proper
solution would be to open a feature request against powerlevle10k so
that your terminal gets first class support (it's not the only
terminal that uses marks of this sort).

Roman.

[1]: printf '\e]7;%s\e\\' $PWD >$TTY


  reply	other threads:[~2021-02-05 19:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CABfObkBhX1jDB8aUGMvd52NGH8twOJdohX-0XfRsGgctjDxBGw@mail.gmail.com>
     [not found] ` <CAN=4vMopsqPWNTfgGCsG2Tmt6JkaUbkh9_ikcJ4FCTe=NZbA6w@mail.gmail.com>
     [not found]   ` <CABfObkBN-gb14=yF=zzE+tCwqS2AdJk67==pasMWw0q=iuEhkQ@mail.gmail.com>
2021-02-05 18:02     ` Roman Perepelitsa
2021-02-05 19:05       ` Christian Parpart
2021-02-05 19:32         ` Roman Perepelitsa [this message]
2021-02-05 21:34           ` Christian Parpart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN=4vMrvV7MiCR07+A75fHFtnZR3nhKv8tigYhYXB8iX7o6K7w@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=christian@parpart.family \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).