Open Achifaifa opened 8 years ago
Readline has a list of 'delimiter' characters, which includes space. When you tab complete, it goes back to the last delimiter character to determine the token it's going to use for completions - so if you do a = b.<tab>
, it's only completing on b.
.
We're moving away from readline in master, but for now completion still works like that. It has been that way as long as we've had tab completion, so it's not top priority.
Oh nice to know, thank you.
FWIW master (with prompt_toolkit) seems to have the same issues.
Yep, the switch to prompt_toolkit has not directly changed this - the completion machinery needs some reworking.
I doubt I can tackle that for 6.0, bumping to 7.
This sounds similar to #8923, but I don't think they are related enough (Plus this happens on linux). I've seen some issues open regarding autocomplete but I haven't seen one describing this.
When I'm in a folder that contains multiple test files (like
this is a test file 1
), ipython successfully autocompletes the files in instructions likewith open("this<tab>
(It suggest some things that are not files, but whatever, close enough).However, when pressing tab after a space, it autocompletes literally everything, which is not helpful (I'm not sure if that's the intended behaviour, but it's certainly not what I was expecting).
I can reproduce the issue every time I try to autocomplete a file name after a space.