summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command/_django
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_django')
-rw-r--r--Completion/Unix/Command/_django39
1 files changed, 3 insertions, 36 deletions
diff --git a/Completion/Unix/Command/_django b/Completion/Unix/Command/_django
index 4893dcb64..beae82776 100644
--- a/Completion/Unix/Command/_django
+++ b/Completion/Unix/Command/_django
@@ -24,38 +24,8 @@ _arguments -C \
case $state in
subcommand)
- subcommands=(
- "cleanup:remove old data from the database"
- "compilemessages:compile .po files to .mo for use with gettext"
- "createcachetable:creates table for SQL cache backend"
- "createsuperuser:create a superuser"
- "dbshell:run command-line client for the current database"
- "diffsettings:display differences between the current settings and Django defaults"
- "dumpdata:output contents of database as a fixture"
- "flush:execute 'sqlflush' on the current database"
- "inspectdb:output Django model module for tables in database"
- "loaddata:install the named fixture(s) in the database"
- "makemessages:pull out all strings marked for translation"
- "reset:executes 'sqlreset' for the given app(s)"
- "runfcgi:run this project as a fastcgi"
- "runserver:start a lightweight web server for development"
- "shell:run a Python interactive interpreter. Tries to use IPython, if it's available"
- "sql:print the CREATE TABLE statements for the given app(s)"
- "sqlall:print the CREATE TABLE, CREATE INDEX and custom statements for the given app(s)"
- "sqlclear:print the DROP TABLE statements for the given app(s)"
- "sqlcustom:print the custom table-modifying SQL statements for the given app(s)"
- "sqlflush:print the SQL statements required to return all tables to installation state"
- "sqlindexes:print the CREATE INDEX statements for the given app(s)"
- "sqlreset:print the DROP TABLE and CREATE TABLE statements for the given app(s)"
- "sqlsequencereset:print the SQL statements for resetting sequences for the given app(s)"
- "startapp:create Django app directory in this project's directory"
- "startproject:create a Django project directory structure for a given project name"
- "syncdb:create database tables for apps in INSTALLED_APPS where required"
- "test:run the test suite for the specified app, or the entire site"
- "testserver:run a development server with data from the given fixture(s)"
- "validate:validate all installed modules"
- )
-
+ local -a subcommands
+ subcommands=()
for cmd in $(./manage.py --help 2>&1 >/dev/null | \
awk -v drop=1 '
/^Available subcommands/ { drop = 0; next }
@@ -67,10 +37,7 @@ case $state in
}
')
do
- if ! echo $subcommands | grep -qs "${cmd}:"
- then
- subcommands+=($cmd)
- fi
+ subcommands+=($cmd)
done
_describe -t subcommands 'django admin subcommand' subcommands && ret=0