From 2131a2bd3c6795d668afaa9d135fc67d6ae94b8c Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Tue, 18 Jun 2024 09:29:38 +0200 Subject: [PATCH] lf: prevent flashing a missing prompt --- .config/zsh/.zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index ee67a8f..955ef39 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -66,7 +66,8 @@ function reset_beam() { echo -ne '\e[5 q' } # Use lf to switch directories and bind it to ctrl-o function lfwrap () { LF_DIRFILE="/tmp/lfdir.$(uuidgen)" - lf -last-dir-path="$LF_DIRFILE" + lf -last-dir-path="$LF_DIRFILE" \ + -command "set promptfmt \"$(zsh -c 'source $ZDOTDIR/configs/shared; print -P $LF_PROMPT')\"" dir="$(cat "$LF_DIRFILE")" \rm "$LF_DIRFILE" if [ -d "$dir" ]; then