Closed micheles closed 7 years ago
It is not worth spending time for this. It also probably very difficult.
For reference, git uses the Damerau-Levenshtein algorithm to suggest alternatives for mistyped commands. See also the functions help_unknown_cmd(...)
and help_unknown_ref(...)
in https://github.com/git/git/blob/master/help.c for git's solution to this issue.
We can do that in Python, there are libraries for smart autocompletion. The problem is that I do not want to abandon argparse which is in the standard library. Also, I do not think it is worth the effort, given that the direction we are going is towards a Web/QGIS interface. The command-line will be left for power users who know what they are doing,
For instance
we get the error for
oq
not foroq engine
. It is not clear if this can be solved, since it looks like an issue of argparse.