#36322: "Enhance manage.py CLI: Suggest alternatives for unknown commands (typo
correction)"
-------------------------------------+-------------------------------------
Reporter: Rishav | Type: New
| feature
Status: new | Component: Core
| (Management commands)
Version: 5.2 | Severity: Normal
Keywords: CLI management | Triage Stage:
commands typo correction command | Unreviewed
suggestions difflib Dev UX Django |
improvement error handling |
command-line interface helpful |
error messages Django core |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
When using manage.py, if a user enters an incorrect or misspelled command,
Django currently does not provide suggestions for the correct command.
This can lead to frustration, especially for developers who may make
typographical errors or are unsure of the exact command name.
Proposed Solution: Enhance the manage.py command-line interface to
automatically suggest possible alternatives for unknown commands. The
suggestion should be based on a comparison between the user’s input and
the available commands using Python’s built-in difflib.get_close_matches()
function. This will help users by displaying a helpful message indicating
potential command suggestions.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36322>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.