1
0
Fork 0

lf: prevent flashing a missing prompt

This commit is contained in:
Luca Bilke 2024-06-18 09:29:38 +02:00
parent c4fc6cfb7d
commit 2131a2bd3c
No known key found for this signature in database
GPG Key ID: C9E851809C1A5BDE
1 changed files with 2 additions and 1 deletions

View File

@ -66,7 +66,8 @@ function reset_beam() { echo -ne '\e[5 q' }
# Use lf to switch directories and bind it to ctrl-o # Use lf to switch directories and bind it to ctrl-o
function lfwrap () { function lfwrap () {
LF_DIRFILE="/tmp/lfdir.$(uuidgen)" 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")" dir="$(cat "$LF_DIRFILE")"
\rm "$LF_DIRFILE" \rm "$LF_DIRFILE"
if [ -d "$dir" ]; then if [ -d "$dir" ]; then