I've got an alias for python3, 'py' - it's set up as you might expect in my .bashrc file.
alias py='python3'complete -F _python pyThe issue is that complete will only work if I try to complete with the base python command python prior. Here's an example in the terminal log below:
~/askubuntodemo: ls main.py~/askubuntodemo: py -bash: completion: function `_python' not found~/askubuntodemo: python main.pyhello world~/askubuntodemo: py main.pyhello worldIs there a way I can initialise the autocomplete as soon as I log in as opposed to having to manually initiallise by doing a complete with the main python complete first.
(edit: for error in .bashrc while posting)