Closed TLINDEN closed 6 months ago
You want fzf to reappear or not? If you don't want it to reappear, use become
action instead.
If you do want it to reappear, but just want to see the error, you could add || read
to wait for the enter key.
printf "foo\nbar\nhowdy"|fzf --bind "enter:execute:ssh {} || read"
Does this answer your question?
Yeah, that's the solution, indeed. Many many thanks!
man fzf
)Info
Problem / Steps to reproduce
Let's say I have this fzf call:
Now if the executed command fails, it prints some error message to STDERR and exists, which I can't see, because once the program exits, the fzf selection re-appears, "overwriting" the error.
My current workaround looks like this:
And then:
Now if the command (as ssh in this case) fails, the script pipes into less, so I can read and act on it. If no error occured, it just removes the copy and exits itself.
Is there a solution for this kind of problem or would it be possible to add some feature to catch errors and display them (like, in a [configurable?] popup or something like this)?