Reputation: 4236
In ipython 5.0, the autocompletion function seems to be replaced by a new one.
Now "os.[tab]" does not display a list of possible commands, but seems to cycle through the module members. But while it does, it seems to display below the current line a list of possible members, but all but the currently selected one are black on black on a standard terminal (urxvt), which worked with ipython 4.0 before just fine.
How can i adjust the colors (of the inactive items) or get back to the old completion mode?
The ipython is a fresh installation in a python2 virtualenv
on Debian linux.
When i press tab again, os.abort
is hidden and os.access
below becomes bright white. Hitting tab a few more times it goes further down and then jumps to the next column with os.chdir
. Looks like intended behaviour for this (different) kind of tab completion, but the colors of the inactive entries are wrong.
In KDE "konsole" it behaves differently:
in an xterm (with default white background) the font colors are the same, so this does not depend on the terminals color scheme.
I reset my urxvt settings and got with a default white terminal:
So the black / white foreground colors seem to work, but both gray tones are not displayed. I wonder if its an urxvt or ipython bug, maybe with non-standard color names or something similiar.
Upvotes: 4
Views: 684
Reputation: 1213
An alternative to using urxvt's reverse video is a custom color palette with these .Xdefaults:
urxvt*foreground: white
urxvt*background: black
*color0: #2E3436
*color1: #a40000
*color2: #4E9A06
*color3: #C4A000
*color4: #3465A4
*color5: #75507B
*color6: #ce5c00
*color7: #babdb9
*color8: #555753
*color9: #EF2929
*color10: #8AE234
*color11: #FCE94F
*color12: #729FCF
*color13: #AD7FA8
*color14: #fcaf3e
*color15: #EEEEEC
As described in http://bastian.rieck.ru/blog/posts/2013/making_urxvt_beautiful/.
Put them into your ~/.Xdefaults
file and activate them via xrdb .Xdefaults
. The next time you open an urxvt
instance the new colors will be used.
Upvotes: 0
Reputation: 4236
Debian has a separate package rxvt-unicode-256color
for the version with full color support. Using this version, the ipython colors are correct.
Upvotes: 2
Reputation: 231615
On my terminal (Ubuntu linux) the completion list appears as black text on a gray background. Up/down keys scroll through this, with the current selection appearing on the IN
line as well as highlighted with white text on dark gray.
Repeated tab also steps through the list (column by column). Lists that are too long to show on the window has <>
edge markings. I can see that >
on your screen shot.
I not fully adjusted, but for long lists (e.g. whole os
) it is better than the previous less
style of paging.
It looks like your terminal color scheme does not handle this gray and dark gray back grounds. I use a default Ubuntu (Mate) terminal with a black on white, but this tab highlighting works the same if I switch to a white on black
profile.
My ipython profile includes
c.TerminalInteractiveShell.color_info = True (default)
c.TerminalInteractiveShell.colors = 'LightBG'
I've played with %colors
and profile settings, and can't get rid of the gray background.
So the problem could be in your terminal profile, or in the ipython
config settings. I don't know if there's a way of reverting the tab completion back to the previous style.
Upvotes: 1