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

Auto suggestions cannot be completed when in the middle of multi-line input #13970

Closed
lukelbd opened this issue Mar 12, 2023 · 3 comments · Fixed by #13991
Closed

Auto suggestions cannot be completed when in the middle of multi-line input #13970

lukelbd opened this issue Mar 12, 2023 · 3 comments · Fixed by #13991
Labels
autosuggestions Related to fish-like autosuggestion feature (as opposed to the tab-completions) bug

Comments

@lukelbd
Copy link

lukelbd commented Mar 12, 2023

Completing an ipython 8 autosuggestion by pressing ctrl-f or ctrl-e works perfectly for code on the final line of multi-line input (the following two screenshots show before and after pressing ctrl-f or ctrl-e):

Screenshot 2023-03-12 at 14 09 48

Screenshot 2023-03-12 at 14 10 00

However pressing ctrl-f or ctrl-e fails when trying to complete the suggestion in the middle of multi-line input -- instead, the only thing that works is holding down right arrow until the suggestion is completed:

Screenshot 2023-03-12 at 14 11 27

Note this problem persists across different terminals (apple Terminal and iTerm2) and after disabling custom bashrc and inputrc. Is there any way suggestions can be completed with one keystroke in the middle of multi-line input?

@krassowski krassowski added autosuggestions Related to fish-like autosuggestion feature (as opposed to the tab-completions) bug labels Mar 12, 2023
@krassowski
Copy link
Member

Thank you for the report, I can reproduce it. Here are two workarounds for now:

  • you can use End
  • you can update to 8.11 where right was changed back to complete full line (whereas ctrl + right completes token-by-token and alt + right completes character-by- character).

@lukelbd
Copy link
Author

lukelbd commented Mar 12, 2023

Thanks for the quick response. Unfortunately I tried hitting Right in ipython 8.11 and it doesn't work (Ctrl+Right and Alt+Right also don't work)... so now there seems to be no way to complete a middle line.

Edit: Actually while Right and Alt+Right don't work, Ctrl+Right works in Terminal but not iTerm2 (on my setup). However End does work in both ipython 8.10 and ipython 8.11. I'll use that for the time being.

@krassowski
Copy link
Member

This is not strictly related to this bug, but I just wanted to ask if you happen to have an opinion on #13987? Please leave 👍 or 👎 over there if you do - thank you :)

Carreau added a commit that referenced this issue Mar 30, 2023
Fixes #13970. Relates to
#13443.

Documents #12603 with a new
`emacs_like_insert_mode` filter alias.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosuggestions Related to fish-like autosuggestion feature (as opposed to the tab-completions) bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants