# Terminal with autocomplete no longer useful

See the following screenshot.

Tab-completion in the Mac terminal is no longer useful, because there is no way to scroll down to see the rest of the options. I don't know when this change came in but I have a beta of 7.4. I assume that we are either using IPython differently, or that it changed itself. Can anyone help? Or is this simply a bug?

edit retag close merge delete

1

It displays as many completions as it can fit in the window, so it helps to make the terminal window bigger or to start at the top of that window. If you hit ctrl-L while the list of completions is visible, it will clear the screen and therefore show you more completions.

( 2016-12-01 17:24:21 +0200 )edit

Thanks for that comment - I tend to not make the windows bigger unless I'm going to be working for a while in it, but that is good to know.

( 2016-12-02 05:23:26 +0200 )edit

Sort by » oldest newest most voted

Check if you already have the files

profile_default/ipython_config.py
profile_default/ipython_kernel_config.py


inside the folder given by the command sage -ipython locate. If you do not have those files, the following commands creates them:

sage -ipython profile create


In the file profile_default/ipython_config.py, uncommenting the following line:

c.TerminalInteractiveShell.display_completions = 'readlinelike'


will give the tab completions as before! Or if you like the new multicolumn, you can increase the number of rows from 6 to 30:

c.TerminalInteractiveShell.display_completions = 'multicolumn'


While you are there, you may also want to set the default color properly:

# Set the color scheme (NoColor, Neutral, Linux, or LightBG).
c.InteractiveShell.colors = 'Linux'     # Linux is for dark background

more

Amazing, i was going to edit my answer into those lines ! All options can be found here : http://ipython.readthedocs.io/en/stab... and indeed, we can/should add something into the Sage documentation about that.

( 2016-12-01 14:46:50 +0200 )edit

Regarding the colors, note that it also depends on the type of terminal. I personally had some issues with urxvt and none with xterm.

( 2016-12-01 14:49:43 +0200 )edit

Wow, this is great and definitely should be added to documentation. I think that once I had those type of files but in a long-ago version of ipython. Thank you! Sorry, @tmonteil, this answer is better ;)

( 2016-12-01 15:10:58 +0200 )edit

Only note that the 'readlinelike' isn't one I can uncomment, had to do it by hand.

( 2016-12-01 15:16:48 +0200 )edit

There is a problem with this solution - what happens if your IPython is upgraded? I just found out that then I have to start over from scratch ... surely there is some profile not in the .sage folder?

( 2017-01-19 15:08:52 +0200 )edit

I also find that annoying, and it is not specific to mac. You can still move along the choices with up/down arrows or TAB/SHIFT+TAB keys. To what i understood, it appeared when ipython moved from readline to prompt_toolkit, fancier, but less handy :(

more

"The overhaul of the terminal interface will probably cause a range of minor issues for existing users." Yup. I also can't see anything under my cursor - in particular, I have autocompleting parentheses from another thing (on purpose) and forget to not complete them because I can't see the second paren.

( 2016-12-01 03:00:12 +0200 )edit

So ... maybe we should update the documentation somewhere?

( 2016-12-01 03:00:51 +0200 )edit