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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30732 invoked from network); 5 Feb 2021 19:33:38 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Feb 2021 19:33:38 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612553618; b=XK1659ZfLMssJWHHNyrsa1B/QuDYYIWSIevgqyIBXUvspuFTTsf0vhthC/RiocwK1xcp0fYkKO sLGaDvrIg4E8RTsFV43/Ptv7YOk48xyVpFIbJ8S5/4s9rNc5OG0/h4K6ytv5EJJEJKgo0HJrvz 6vZsMxO1Df2RpuR3HmSxq4CvYddqKqTVJ9DN7C7YEIFOjffX/IdTyZ09umM/0xyoYp2r6G7pYg 5bMw1acizfbJNi4Cm9NtxqvVowJ1C14PxNo3rY2eG9O3iJWg1b9cSZ/KL0hcMVrrBSxiD7gd5i B9Mb278SxMU2z7zD2F417zQGhRSBMw0S9ZtC1zrtkNLikw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-il1-f172.google.com) smtp.remote-ip=209.85.166.172; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1612553618; bh=D/S3XnJdpC11Qyp3LLnzlwfOfcaRfov6MDUKednfmWE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=YVgnvHrcVCXYgdcCwg+Y+RTtYKUgPF18fdX2b3GDLCP0xr0RIxIJDiOT5/lQLlHDdMMwVAc+P0 qsRmJoJkTD22nqywgu075nRnMgw+wngWrSzDwaaEovAKxPEXkWTo0Ab86JYVT7a0UF30yql6QV 1NY1nfr+io3/M/8tQz5Yw6IkA9WR/NJwHKr2xMYEdw+IuGiAxnYUQyyMK5T9ksm5lT1fAiSkfh pVemf7a8Ay+jw9XEweSYqFSdjE7uNwauRfQsU+oxhaSH2YCO6BkwigwFcechB+h9eCU2mm0mCe ZQaJxnMuIqIlQCJ4EmYhIuHgpMzemC0mbP4aiCoFpk/pdQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=/P1IehV5nFPgB7Eaq2uyBpReCvsAuOESga5SeX0nA+E=; b=u4Yk3VCr+1d4RvCL+hlwBeBfCq 1QgrptAw+uKWLk39O0inZbzSChMyocrNLrO/xt3uqeURQef29SQagrNZXGCFJrNa+M/9RYE+K6iZR ecTTwx5zRjKr7bu1XUt7yPcHae8u32/RTPZ415ypIYNCkpy/wVFZbmaXnrbA+gyGV9q/NjUR7+MmZ m50itavWzcJ65Uz9wg5Deh61yIMJmNijYSwCpacZBrVLcQL0TUfdG8OMlg3q6ZcHTP+AR4I/aizBW Dx3mmV3g18MdiUr9AQHkOF957NZjs+eNFanUoTjjc2HkIY4TtohyeGWPAho4Id+8OnWwd5EqQCBCm cyIX/50A==; Received: from authenticated user by zero.zsh.org with local id 1l86rJ-0007pw-NG; Fri, 05 Feb 2021 19:33:37 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-f172.google.com) smtp.remote-ip=209.85.166.172; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-il1-f172.google.com ([209.85.166.172]:42048) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1l86qn-0007TR-MG; Fri, 05 Feb 2021 19:33:06 +0000 Received: by mail-il1-f172.google.com with SMTP id z18so6853948ile.9 for ; Fri, 05 Feb 2021 11:33:05 -0800 (PST) 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=/P1IehV5nFPgB7Eaq2uyBpReCvsAuOESga5SeX0nA+E=; b=RR2ZYX4+kisGnIKVea5UkXdgBzCPgbN0b2Yp7fcsQoRH1XD6MUCbm01buqUAmehn4c sRtGWG+Dy84mZ8sssLJI2XNxEH8+iiYgmS0GIwA2P1QNHHgmMgjYR9C+YtOp3N1L0pp6 HCrIgteyhcML/AtNwnA5Wt7tLrJbzoyfZTytByyHx8eV1ScT3wGM5hYS07OkgnSjr4JK qn+lWx/9LDla3FhuOhH/FcBydP5faLlBKpNM6frau3XdrVLpQ9teyoQLDl1R/F9bIyAO e4Qsy4bXt2DTT4o1S0gDDGXRFPxs/B41za2IRb8+n/F84ImK/D9jiRFU4Sb3QtB8YmYP 2eYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/P1IehV5nFPgB7Eaq2uyBpReCvsAuOESga5SeX0nA+E=; b=Fvawxm1KE0q+ldgfvUSim7QGp0HCtaAhcPISVCoceDxSycqikN197229mOkixCenmd 7n05pgZJ7BnvBL6cDt1s+W//RU/ITOWe++Q169jG5otvdiWFzXHGYblIx8g0Pn8Yu8Mr lNovU9cdm18oZ9m6C24GJfw+Gja8fMzyvdiwb2A6rQvW0lqaa7+DuGdcJU0uF7FX3U3D pZW8ux4OxoH9PY7xG3to+MQpM5MM9VflC87vwUG0IWhNamidbDnLjrxo1/atD7rIVAqA fOE7Qxb7GQCoIXyJUXC5Kws8i2exrhR8W1FyIvc9KijAz3gyrSCVRQrmWoro3R+8Ol4m M1Fg== X-Gm-Message-State: AOAM531kFHR6LquEv75g9ScP3VMIaYIrUZLML3Z6aVLfsVoREYlg/3tD HydnphkzCXSytLEXphImY12BxwPkpJvnJAHFaSw= X-Google-Smtp-Source: ABdhPJwKj7r229U5VfWBjOI3sl3tLjG5rRrn+BoEVeTl5ZMx6l+zFA5bpT8/l/Wbu1LNoM1Azd8rFlcmxcahGsZ77CE= X-Received: by 2002:a05:6e02:b:: with SMTP id h11mr5372336ilr.168.1612553584182; Fri, 05 Feb 2021 11:33:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Fri, 5 Feb 2021 20:32:53 +0100 Message-ID: Subject: Re: precmd hook invoked later than usual on very first prompt To: Christian Parpart Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26465 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: Archived-At: On Fri, Feb 5, 2021 at 8:05 PM Christian Parpart 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