Skip to content

Fix completion of '%tim' in the Qt console - #1972

Closed
takluyver wants to merge 1 commit into
ipython:masterfrom
takluyver:qtcomplete-prefix
Closed

Fix completion of '%tim' in the Qt console#1972
takluyver wants to merge 1 commit into
ipython:masterfrom
takluyver:qtcomplete-prefix

Conversation

@takluyver

Copy link
Copy Markdown
Member

From discussion on #1944, this is my attempt at the same fix using regexes.

I'm not yet entirely happy with this - e.g. if you type tim<TAB> without an escape sequence, it still gives you % as the common prefix of the matches. But I'm too tired to work it all out at the moment. Other eyes are welcome, or I'll pick it up in the morning.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess first you want the other way around, set True as default, and False if the typed text contains %#\.....
works better : ti<tab> -> time but then it fails if you do %<tab> where it fastforward to %%

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other thing to try is pd<tab> - in a clean kernel, the only things starting with pd are magic functions, so it should replace it with %pd. I think it will get this wrong if you switch True/False.

@takluyver

Copy link
Copy Markdown
Member Author

OK, I don't think this will work out. Let's concentrate on @Carreau's version in #1944.

@takluyver takluyver closed this Jun 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants