Skip to content

libraries/prompter: Resurrect return-* API #26

@aartaka

Description

@aartaka

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions