c-n-f does not suggest commands with numbers ('bzip' does not suggest 'bzip2')
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
command-not-found |
Fix Released
|
Low
|
Zygmunt Krynicki | ||
command-not-found (Ubuntu) |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Binary package hint: command-not-found
The function similar_words in CommandNotFound.py does not consider numbers in command names, and therefore c-n-f fails to suggest 'bzip2' when given the input 'bzip'.
jim@roro:~$ bzip
No command 'bzip' found, did you mean:
Command 'bip' from package 'bip' (universe)
Command 'jzip' from package 'jzip' (universe)
Command 'zip' from package 'zip' (main)
Command 'xzip' from package 'xzip' (universe)
Command 'mzip' from package 'mtools' (main)
Command 'wzip' from package 'wzip' (universe)
Command 'ebzip' from package 'eb-utils' (universe)
Command 'lzip' from package 'lzip' (universe)
Command 'rzip' from package 'rzip' (universe)
Command 'gzip' from package 'gzip' (main)
bzip: command not found
Adding numbers to the available 'alphabet' in the similar_words function fixes this situation
jim@roro:~$ bzip
No command 'bzip' found, did you mean:
Command 'jzip' from package 'jzip' (universe)
Command 'zip' from package 'zip' (main)
Command 'ebzip' from package 'eb-utils' (universe)
Command 'lzip' from package 'lzip' (universe)
Command 'wzip' from package 'wzip' (universe)
Command 'xzip' from package 'xzip' (universe)
Command 'mzip' from package 'mtools' (main)
Command 'gzip' from package 'gzip' (main)
Command 'bip' from package 'bip' (universe)
Command 'bzip2' from package 'bzip2' (main)
Command 'rzip' from package 'rzip' (universe)
bzip: command not found
Changed in command-not-found: | |
milestone: | none → 0.2.41 |
importance: | Undecided → Low |
assignee: | nobody → Zygmunt Krynicki (zkrynicki) |
status: | New → Fix Committed |
Changed in command-not-found: | |
status: | Fix Committed → Fix Released |
Changed in command-not-found (Ubuntu): | |
status: | Triaged → Fix Committed |
Credit: Reported by ol on #ubuntu-nz, similar_words() identified by ajmitch on #ubuntu-nz. Diff produced by yojimbo-san on #ubuntu-nz.