-
Notifications
You must be signed in to change notification settings - Fork 714
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
Implement readline's yank-last-arg
#343
Comments
How about creating a patch based on this gist ? I doesn't currently cycle back to the beginning, but it should be easy to modify it. It is also not identical to the readline's behavior, specifically on how readline recalls arguments from |
The gist also takes care of |
Fixes prompt-toolkit#343. Alternative implementation to prompt-toolkit#336 that uses a single function and also implements `yank-nth-arg`, in the same style as readline.
Thanks for the gist! I adapted it into my implementation in #407 which uses function 'local' variables rather than a separate state and also deduplicates on repeat presses like readline does. |
Thanks everyone for the pull requests! So far, I did not had any time yet to review/merge this functionality, but I hope to do it soon. It's very useful! |
Hi everyone, this functionality has been mergen in 0c09bf0 If you have time, could you have a look and see whether it works? Jonathan |
Can this useful feature be used with vi binding as well? I'm using Xonsh and for the time being I added this binding: @events.on_ptk_create
def custom_keybindings(bindings, **kw):
@bindings.add('escape', '.')
def yank_last(event):
event.current_buffer.yank_last_arg() |
Please don’t comment on eight year old issues. Instead, open a new one referencing this one... |
The implementation of readline's
yank-last-arg
command is currently a TODO. It would be good for it to actually get implemented!The text was updated successfully, but these errors were encountered: