Decrease amount of suggestions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
command-not-found (Ubuntu) |
Fix Released
|
Low
|
Michael Vogt |
Bug Description
Binary package hint: command-not-found
command-not-found should limit the amount of suggests it offers.
For example if you accidentally type 'l' instead of 'ls', the following happens:
$ l
No command 'l' found, did you mean:
Command 'el' from package 'oneliner-el' (universe)
Command 'cl' from package 'cl-launch' (universe)
Command 'vl' from package 'atfs' (universe)
Command 'al' from package 'mono-devel' (main)
Command 'ld' from package 'binutils' (main)
Command 'ld' from package 'hardening-wrapper' (main)
Command 'ld' from package 'binutils-gold' (universe)
Command 'le' from package 'le' (universe)
Command 'nl' from package 'coreutils' (main)
Command 'ln' from package 'coreutils' (main)
Command 'lh' from package 'live-helper' (universe)
Command 'li' from package 'limo' (universe)
Command 'lv' from package 'lv' (universe)
Command 'ls' from package 'coreutils' (main)
Command 'lp' from package 'cups-client' (main)
Command 'lp' from package 'lprng' (universe)
Command 'rl' from package 'randomize-lines' (universe)
Command 'lz' from package 'mtools' (main)
Command 'pl' from package 'tendra' (universe)
Command 'bl' from package 'gpe-conf' (universe)
Command 'sl' from package 'sl' (universe)
Command 'i' from package 'iprint' (universe)
Command 'r' from package 'littler' (universe)
Command 'w' from package 'w-bassman' (universe)
Command 'w' from package 'procps' (main)
Command 'ul' from package 'bsdmainutils' (main)
This is seems useless, and the maximum amount of suggests ought to be decreased. It also doesn't seem likely that a user would attempt to use command-not-found to help them find a package by using a single letter.
Related branches
Changed in command-not-found (Ubuntu): | |
assignee: | nobody → Michael Vogt (mvo) |
importance: | Undecided → Low |
status: | New → In Progress |
I set the minimal length for a mis typed command to two now. The problem with making the number of suggestions smaller is that there is currently no "ranking" whatsoever to know how/where to cut the number of suggestions. I guess it should print something like "there are 10 alternative spellings for this command" or something in the case where there are a lot of suggestions?