Reputation: 37441
In the ipython
shell, is it possible to set it up so that I can define tab completion for function/method parameters? I have several methods that will only ever take certain arguments from a defined list of potential arguments, and it would be nice if I could tab complete them from inside the list.
If this is possible, how can I set it up? I'd imagine it would be possible somehow, given that it's written in python.
Upvotes: 3
Views: 1344
Reputation: 40340
Not easily, no.
There are ways to extend the possible tab completions, but as far as I know, no simple ways to restrict the list of possible completions.
If you want to try to hack something together, I think this is the place in the code to start looking: https://github.com/ipython/ipython/blob/master/IPython/core/completer.py#L317
Upvotes: 2