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.
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