zsh-workers
 help / color / mirror / code / Atom feed
From: Christian Parpart <christian@parpart.family>
To: zsh-workers@zsh.org
Subject: precmd hook invoked later than usual on very first prompt
Date: Fri, 5 Feb 2021 18:12:50 +0100	[thread overview]
Message-ID: <CABfObkBhX1jDB8aUGMvd52NGH8twOJdohX-0XfRsGgctjDxBGw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

Hi,

I'm using zsh (fairly new to me) with oh-my-zsh and now also with p10k
customization, so that my prompt actually covers two lines, whereas the
first one is some meta info (cwd, etc), and the second will be the
(somewhat) decorated prompt.

Now, `add-zsh-hook precmd _my_precmd`,  as well as `add-zsh-hook preexec
_my_preexec` are being all invoked nicely.

Except for the very first prompt right after process spawn the preexec hook
is NOT being invoked on the upper line (first line of screen in a new
terminal, as with every other future prompt, but in the second line).

This makes it sadly nondeterministic and sadly kinda useless in my use case
at least. I (with no knowledge of zsh) would say thats a bug, hence I'm
writing here with the hope of some help or a trigger for a bugfix.

Best regards,
Christian Parpart.
p.s.: I'm using Ubuntu 20.10 (if that matters)

[-- Attachment #2: Type: text/html, Size: 1083 bytes --]

             reply	other threads:[~2021-02-05 17:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 17:12 Christian Parpart [this message]
2021-02-05 17:34 ` Roman Perepelitsa
2021-02-05 17:58   ` Christian Parpart
2021-02-05 18:02     ` Roman Perepelitsa

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=CABfObkBhX1jDB8aUGMvd52NGH8twOJdohX-0XfRsGgctjDxBGw@mail.gmail.com \
    --to=christian@parpart.family \
    --cc=zsh-workers@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).