Django bash completion enables tab-completion of django-admin.py and manage.py commands in bash.
There are autocompletion scripts for zsh
for django but they does not work with custom commands. One of them is in oh-my-zsh project.
I am also aware of bashcompinit
but it does not seem to work with django-admin, producing following error:
./manage.py Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
self.autocomplete()
File "lib/python2.7/site-packages/django/core/management/__init__.py", line 266, in autocomplete
cwords = os.environ['COMP_WORDS'].split()[1:]
File "bin/../lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'COMP_WORDS'
Is it possible to have Django bash completion working with zsh? Or is there some other alternative that would allow using of django admin custom commands.