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!)
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:
return
function to Prompter.run-action-on-return
to it.run-action-on-return
there (suddenly, it all makes sense:run-action-on-return
is called insidereturn
, which returns the result of prompting!)Original commentary: https://github.com/atlas-engineer/nyxt/pull/2655#discussion_r1073311060