#1041736 aptitude: if package to be upgraded is not found, please search for the correct package name approximately

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Al Ma
Date:
2023-07-22 18:39:03 UTC
Severity:
normal
#1041736#5
Date:
2023-07-22 18:35:36 UTC
From:
To:
Package: aptitude
Version: 0.8.13-5
Severity: wishlist
Today I wanted to upgrade the pacakge sudo but made a typo:
# aptitude upgrade suo
Couldn't find any package whose name is "suo", but there are 4 packages which contain "suo" in their name:
golang-github-bmatsuo-lmdb-go-dev festvox-suopuhe-lj festvox-suopuhe-mv festvox-suopuhe-common
Unable to apply some actions, aborting
Clearly, neither of the suggestions of aptitude is anywhere close to my intention.  I propose that aptitude searches approximately, akin to what tre-agrep does, and suggests first packages whose names deviate by 1 character from the asked one, then by two characters, then by three, …, and stops after it has listed all the packages with the current number of deviations (and increases the admissible number of deviations if less than 4 packages have been found so far) or until the list of the known packages is exhausted, whichever comes first.
Gratefully,
AlMa