-
Notifications
You must be signed in to change notification settings - Fork 178
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
Add Cmd::Yield
for complex custom bindings
#342
base: master
Are you sure you want to change the base?
Conversation
What's the status of this PR? I'm not a maintainer but these changes look good to me. @tailhook maybe you could move the |
I can move them before, not after. The issue is that But generally I've not got any agreement that this functionality would be accepted. So I don't want to waste time on rebasing it until that. (And this PR is terribly outdated) Also, the biggest issue with |
Fair enough. In the meanwhile I'll create a private fork of rustyline since I really need I hope this PR gets the attention it deserves as having the ability to bind custom behavior to certain keystrokes is crucial for any readline implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Is this still being considered? I'm very interested in this feature. |
This partially replaces #293, i.e. some custom bindings can be implemented like this, although using
Yield
-style bindings is more complex so PR's are mostly unrelated.The idea behind the
Yield
building is that we return from thereadline
function with a special error value which holds user's value (Arc<dyn Any>
) along with current input. This may be used by user's REPL loop for many complex to implement but useful things like:yield_binding
example as part of this PRWhat do you think?