Package: zsh Version: 4.3.9-1 Tags: patch Severity: wishlist The current completion script for Django's manage.py files hardcodes the possible subcommands. However, custom management commands are widespread, so it would be nice to at least allow completion.
Patch attached.
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected]
`-
diff -urNd zsh-4.3.9.orig/Completion/Unix/Command/_django
zsh-4.3.9/Completion/Unix/Command/_django
--- zsh-4.3.9.orig/Completion/Unix/Command/_django 2009-03-01
11:30:13.000000000 +0000
+++ zsh-4.3.9/Completion/Unix/Command/_django 2009-03-01 11:30:44.000000000
+0000
@@ -57,6 +57,15 @@
"testserver:run a development server with data from the given fixture(s)"
"validate:validate all installed modules"
)
+
+ for cmd in $(./manage.py --help 2>&1 >/dev/null | \
+ awk -vdrop=1 '{ if (!drop) print substr($0, 3) } /^Available
subcommands/ { drop=0 }')
+ do
+ if ! echo $subcommands | grep -qs "${cmd}:"
+ then
+ subcommands+=($cmd)
+ fi
+ done
_describe -t subcommands 'django admin subcommand' subcommands && ret=0
;;
signature.asc
Description: PGP signature

