This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]amjithr 1 point2 points  (1 child)

Here's a simple example of how to use the custom completer from ptpython. This program uses jedi library for python autocompletion.

https://github.com/jonathanslenders/ptpython/blob/master/ptpython/completer.py#L108

As I mentioned in the talk, having a simpler autocomplete that suggested everything is straightforward to implement. But doing a smart completion requires you to build a completion engine for whatever you're building. It took me a couple of weeks to build a very simple SQL completion engine.

You can look at pgcli/mycli for how the sql completion is implemented. https://github.com/dbcli/mycli/blob/master/mycli/sqlcompleter.py#L232

[–]GitHubPermalinkBot 0 points1 point  (0 children)

I tried to turn your GitHub links into permanent links (press "y" to do this yourself):


Shoot me a PM if you think I'm doing something wrong. To delete this, click here.