With those package managers that give suggestions, how do you know which one is correct? Package names are not necessarily the same as the program or upstream project name.
Even if the package name is what you think it should be, it might be the wrong version or wrong part of the software (e.g. a CLI instead of GUI, or a metapackage that includes extra things you don’t want).
Instead of guessing with install first, you should use search and info first.
dnf search test
dnf info ourtest # wrong
dnf info mytest # correct
sudo dnf in mytest # actually know you're installing the correct package
Measure twice, cut once. Saves you time in the long run.
An additional issue is that most interactions with dnf are supposed to be non-interactive and / or “unattended”. It might be possible to make an opt-in feature like this (with an additional --interactive argument, for example), but imagine, for example, servers which run dnf commands to auto-update, or test farms which use “dnf install” to prepare environments, suddenly failing because dnf started requiring interactive user input.
I searched for the tor browser but just new the tor package so I checked with
sudo dnf list *tor* this gave me to much options so i just removed the asterisk before tor, sudo dnf list tor*
Then to be sure if it is what I wanted I checked with dnf info the torbrowser-launcher packages to see what it contains and for what exactly it is.
Not quite true IMHO. For example with dnf the install, reinstall, remove & upgrade commands require that one acknowledge and approve the action before dnf actually does the change. This can be automatically approved by using the -y option, but it still seems actually designed for user interaction from the cli with that option as a shortcut way to run it from scripts or unattended.
Well, true, those environments usually use the --assumeyes / -y flag. However, even that won’t help you with questions that are not yes/no like “here’s a choice of three packages, which one do you want”.
The package manager (dnf, written in Python/C) is currently undergoing a complete rewrite as DNF5 (written in C++) - while they’re still busy making sure there’s no missing crucial features, something like an --interactive flag might be something they’re interested in. I would say open a ticket with the project, and if they’re interested, you can try implementing it:
We clearly have differing definitions of interactive. Dnf has been clearly interactive for quite some time. Intelligent, no, but interactive, yes!
It seems the OP was asking for “fuzzy search” features and not just strict search as dnf has been to date. That should be relatively simple to implement since many apps and web browser search engines have that feature today.
It is already nearly there since one can use globs