How to use lf's echo command with variables? #2326
Answered
by
CatsDeservePets
sludgeFudge
asked this question in
Q&A
-
|
Hey everyone, I'm trying to get lf to toggle the However, lf just prints: |
Beta Was this translation helpful? Give feedback.
Answered by
CatsDeservePets
Dec 28, 2025
Replies: 1 comment 4 replies
-
|
Hello @sludgeFudge! map W :set watch! ; %echo "\033[0;46m watch $lf_watch \033[0m" |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
sludgeFudge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @sludgeFudge!
That is because you are executing the command in
lf's normal command line which has no understanding of env vars. You need to make it ashell-pipecommand (shell command that pipes its output tolf's ruler) by adding a%in front of it (also adding a reset sequence after it to avoid ui glitches):