When someone makes a typo in writing out a command, say tldr fiel instead of tldr file, the program suggests the top n nearest matches in its database based on an approximate string matching algorithm. We can further limit the suggestions to have some minimum proximity to the original typed command, so that the suggestions are not very far fetched in case the command is something strange.
Ubuntu has something similar at its command prompt. For instance, when you type fiel, it outputs the following:
Command 'fiel' not found, did you mean:
command 'field' from deb rheolef (7.1-1)
command 'file' from deb file (1:5.38-4)
When someone makes a typo in writing out a command, say
tldr fiel
instead oftldr file
, the program suggests the top n nearest matches in its database based on an approximate string matching algorithm. We can further limit the suggestions to have some minimum proximity to the original typed command, so that the suggestions are not very far fetched in case the command is something strange.Ubuntu has something similar at its command prompt. For instance, when you type
fiel
, it outputs the following: