#10752 closed (fixed)
Advanced Bash Completion
Reported by: | Arthur Koziel | Owned by: | Arthur Koziel |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Keywords: | bash completion | |
Cc: | flosch@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This patch improves the bash completion. It calls a python function which uses the get_commands()
method to return subcommand suggestions. It also goes through the optparse parser to get option suggestions for a subcommand. There are special cases, like the 'runfcgi' command which uses a python dict to store its options.
This makes it possible to have subcommand completion of 3rd party apps (like django-command-extension).
It's a little hard to explain, so I tried to make a screencast:
http://media.arthurkoziel.com/django/bashcomp.mov
Installation hasn't changed, just source the django_bash_completion file from extras/
Attachments (4)
Change History (14)
by , 16 years ago
Attachment: | django_bash_completion.diff added |
---|
comment:1 by , 16 years ago
Component: | Uncategorized → django-admin.py |
---|---|
milestone: | 1.2 → 1.1 |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
Needs documentation: | set |
---|
comment:3 by , 16 years ago
Cc: | added |
---|
comment:4 by , 16 years ago
milestone: | 1.1 → 1.2 |
---|
comment:5 by , 16 years ago
by , 16 years ago
Attachment: | django_bash_completion.2.diff added |
---|
comment:6 by , 16 years ago
django_bash_completion.2.diff cleans up the code and resolves some inconsistencies with --help and runfcgi.
comment:7 by , 16 years ago
Owner: | changed from | to
---|
comment:8 by , 15 years ago
Just wanted to say thanks to arthurk, because I have a local branch of this ticket and it has proved super useful.
by , 15 years ago
Attachment: | django_bash_completion.4.diff added |
---|
Added app completion for some commands
comment:9 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Just tested it and it works very nicely. Great work! Can't wait for this to land.