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

libraries/prompter: Resurrect return-* API #26

Open
aartaka opened this issue Jan 24, 2023 · 0 comments
Open

libraries/prompter: Resurrect return-* API #26

aartaka opened this issue Jan 24, 2023 · 0 comments

Comments

@aartaka
Copy link
Contributor

aartaka commented Jan 24, 2023

We had a nice function in Prompter before atlas-engineer/nyxt#2655: return-selection. It was a nice, actionable, discoverable name, quite rooted in both programmer lingo and the meaning of the library itself.

Now, the idea of "selection" is deprecated for good, but the actionability of "return"-ing something is still useful. What I suggest is:

  • Adding a return function to Prompter.
  • Move all the channel management operations from run-action-on-return to it.
  • Call run-action-on-return there (suddenly, it all makes sense: run-action-on-return is called inside return, which returns the result of prompting!)

Original commentary: atlas-engineer/nyxt#2655 (comment)

@aadcg aadcg transferred this issue from atlas-engineer/nyxt Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant