2

One thing I like about zsh autocompletion is how it handles situation when more than 1 item matches the pattern. Say I have folders:

./
  abc/
  bbc/
  bcd/

In zsh, when I type b and <TAB>, I can see all the suggestions starting with b (same as in ipython).

But, when I type <TAB> once more in zsh, the autocompleter starts to shift between currently matching suggestions (in the example above bbc and bcd) and I can accept a suggestion by pressing <ENTER>. On the other hand, in ipython I have to type the next letter (b or c) to choose the correct completion.

I would like to have zsh-like completion in ipython -- did anyone manage to get that?

sygi
  • 4,557
  • 2
  • 32
  • 54
  • Have you tried to send a lovely message to iPython devs? – Huy Vo Feb 02 '17 at 15:36
  • Not yet, but it seems ipython devs read the SO ipython tag. Besides, I would not be surprised if someone implemented/set this kind of autocompletion in a form of library and not inside ipython code. – sygi Feb 02 '17 at 16:08
  • 1
    The latest `ipython` (5.+) has a new tab completer. It shows a window of suggestions, which you can scroll through. Or you can add some text and again. In someways I prefer the old style, but I'm getting used to the new. – hpaulj Feb 02 '17 at 16:51
  • In the latest repeated tabs steps through the list – hpaulj Feb 02 '17 at 20:24
  • The latest Ipython uses `prompt_toolkit` instead of `readline`. That package mentions `fish` shell as the model for its completions. – hpaulj Feb 02 '17 at 20:47
  • Ok, the newest autocompletion mechanism satisfy my needs. Thanks for pointing it out and sorry I didn't update ipython before I asked. – sygi Feb 02 '17 at 22:03

0 Answers0