Run commands when the previous command has ran #1560
-
I have a problem. The following code not working properly:
The problem is that the printf command runs even if I hit enter because of the push command. So there should be a solution to jump to the printf command only when the push command has already been executed and I hit enter. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
A better approach would be to have cmd select_filter &{{
lf -remote "send glob-select $1"
lf -remote "send $id !printf ..."
}} The only thing to watch out for is that commands inside |
Beta Was this translation helpful? Give feedback.
-
But how do I give it to him? Because even though * is written out, this can always change. There are times when I transcribe to *.txt, or *.mp3, or string . |
Beta Was this translation helpful? Give feedback.
-
I try the following code (used ! for debug, maybe error messages):
Then type in lf: select_filter *.txt, then select all txt, but doesnt print to select_files, and not show error messages. |
Beta Was this translation helpful? Give feedback.
-
:D Now, working great. Thx and Happy New Year! |
Beta Was this translation helpful? Give feedback.
You are very close, the
$
in$fs
has to be escaped, otherwise it evaluates in the current shell.