How do I prevent an alternate screen from appearing when executing custom cmds? #1693
-
I don't know if this has been asked before or if it's in the docs. But pretty much the title. Let's use the "cmd delete" example in the lfrc.example. cmd delete ${{
set -f
printf "$fx\n"
printf "delete?[y/n]"
read ans
[ "$ans" = "y" ] && rm -rf $fx
}} When I run it, it clears the screen, changes to an alternate screen and prompts to delete the file. Is there a way to prevent this and, let's say, prompt the user inside lf's UI? |
Beta Was this translation helpful? Give feedback.
Answered by
DusanLesan
Apr 23, 2024
Replies: 1 comment 2 replies
-
It is enough to switch from shell prefix cmd delete %{{
set -f
printf "$fx\n"
printf "delete?[y/n]"
read ans
[ "$ans" = "y" ] && rm -rf $fx
lf -remote "send $id echo"
}} edit: added echo at the end to clear status line |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
dievilz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is enough to switch from shell prefix
$
to shell-async prefix%
like:edit: added echo at the end to clear status line