You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
Input, Multiline, Password, and Confirm seem to be the most problematic ones as they hang the entire shell session, where as Select and MultiSelect can exit with [ENTER] or terminate with ^C without a problem (although the output is not what I expected, but that can be a separate issue).
What I am trying to accomplish is a CLI utility inspired by this Rust project
The text was updated successfully, but these errors were encountered:
pbnj
changed the title
Shell hangs when used in $() command-substitution
Shell hangs when used in $(...) command-substitution
Jan 24, 2020
Thanks for reporting. Shell command substitution captures stdout of the command, but Survey only works if both stdin and stdout are attached to a terminal. Right now, what you are describing is not possible.
Thank you for this library.
I have run into a reproducible bug when survey is used in a command-substitution, i.e.
$(...)
.Here is an exmaple using the
examples/simple.go
in this repo.This works fine:
This hangs:
I was expecting to get the same prompts and once answered,
echo $TEST
would outputPbnj chose red.
I have also tried handling interrupts per the FAQ:
But that didn't work in this case.
Input
,Multiline
,Password
, andConfirm
seem to be the most problematic ones as they hang the entire shell session, where asSelect
andMultiSelect
can exit with[ENTER]
or terminate with^C
without a problem (although the output is not what I expected, but that can be a separate issue).What I am trying to accomplish is a CLI utility inspired by this Rust project
The text was updated successfully, but these errors were encountered: