friendly-traceback / friendly

Friendly-traceback's version used in most situations
https://friendly-traceback.github.io/docs/index.html
MIT License
42 stars 5 forks source link

[ENHANCEMENT] Add auto-completion to the friendly REPL #48

Closed mardukbp closed 2 years ago

mardukbp commented 2 years ago

Is your feature request related to a problem? Please describe. Not having auto-completion is unfriendly.

Describe the solution you'd like The friendly REPL should autocomplete its own commands as well as functions from the modules currently loaded.

Describe alternatives you've considered None

Additional context ipython has awesome autocompletion. Could it be possible to reuse it?

aroberge commented 2 years ago

This is out of scope. Instead of adding IPython to friendly, friendly can be added to IPython. Simple type

from friendly.ipython import *

after starting an IPython repl and you get all the nice feature of IPython enhanced by friendly. This approach makes it possible in theory for other "nice REPL" (ptpython, bpython, etc.) to use friendly, so that friendly does not have to worry about trying to have the best REPL with all desired features.

Furthermore, this avoids increasing significantly the number of dependencies, and the problems that come with ensuring compatibilities with all versions.

mardukbp commented 2 years ago

Perfect! Thanks! You are absolutely right.