Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the user to provide some sort of input #61

Open
fritzrehde opened this issue Aug 25, 2023 · 2 comments
Open

Allow the user to provide some sort of input #61

fritzrehde opened this issue Aug 25, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@fritzrehde
Copy link
Owner

My design idea would be to add a possible subcommand:
read -- exec <blocking|non-blocking> ...
So the user input would be read inside the TUI, saved into a env variable (maybe INPUT), which is then set in the subprocess where the exec command is set.
This would make watchbind a lot more reactive and customizable.

@fritzrehde fritzrehde added the enhancement New feature or request label Aug 25, 2023
@fritzrehde fritzrehde self-assigned this Aug 25, 2023
@fritzrehde
Copy link
Owner Author

Actually, it makes more sense to allow a TUI to have custom internal state. So the logical syntax for reading user input into a variable would be:

read-into NAME

and then $NAME will be set both in the watched command and all subcommands as a environment variable.
Additionally, we would allow users to specify state like so:

set-state NAME -- <cmd>
unset-state NAME

where the output of <cmd> gets saved in the state.

@fritzrehde
Copy link
Owner Author

The only thing missing now is the ability to allow the user to set some state dynamically, i.e. by inputting some text into a text field. This is being worked on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant