How to use fzf remotely through SSH, within command substitution? #3072
-
This works as expected: ssh -t example.com "echo -e 'a\nb' | fzf" But I cannot capture the output with Command Substitution: selected_value=$(ssh -t example.com "echo -e 'a\nb' | fzf") Any idea why? And what’s the right usage? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Do you have to run fzf remotely? If that is not the case, a simple workaround would be to run it locally. selected_value=$(ssh example.com "echo -e 'a\nb'" | fzf)
|
Beta Was this translation helpful? Give feedback.
-
Sorry to resurrect an old question @junegunn, but I'm curious if there's a less-simple workaround that doesn't require running |
Beta Was this translation helpful? Give feedback.
Do you have to run fzf remotely? If that is not the case, a simple workaround would be to run it locally.
selected_value=$(ssh example.com "echo -e 'a\nb'" | fzf)