#24134 closed Cleanup/optimization (fixed)
Document short command line options for management commands
| Reported by: | Marc Tamlyn | Owned by: | Tim Graham |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
We are very inconsistent with providing short options for command line flags for management commands. For example, the options provided by the test runner to ./manage.py test all have short options, but the options provided by the management command itself all do not. (-t means --top-level-directory, but there is also --testrunner which has no alternative).
I'm not sure what the correct course of action is but there should be some consistency. Short options are patchily documented - some are, some are not.
Change History (11)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Agreed that we should be documenting them consistently, and options should be consistently used between commands, but I don't think it follows that every option needs to have a short version, nor that we need to deprecate short options entirely.
-v is a good example - it's convenient to be able to use -v instead of --verbose; it's a commonly used option. But everywhere that --verbose is available, -v is (or should be) the short option. But if a command also had a --very-important-flag-we-use-rarely, the fact that there is a collision on -v doesn't mean we should stop using it for the common option, --verbose.
comment:3 by , 11 years ago
| Component: | Core (Management commands) → Documentation |
|---|---|
| Summary: | Deprecate short command line options for management commands? → Document short command line options for management commands |
| Triage Stage: | Unreviewed → Accepted |
comment:4 by , 11 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:5 by , 11 years ago
I work on updating the documentation with the available but not yet documented short versions.
comment:6 by , 11 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:7 by , 11 years ago
| Has patch: | set |
|---|---|
| Patch needs improvement: | set |
| Triage Stage: | Ready for checkin → Accepted |
The docs build doesn't pass with this change.
OK to consistently document all options, short or long, but I don't see the need to deprecate short options.