search: Do not separate a package from a summary with a colon

It was reported that selecting a package name from an output of "dnf5
search" command was difficult because of a colon adjacent to the
pacakge name:

    $ dnf5 search dontpanic
    Updating and loading repositories:
    Repositories loaded.
    Matched fields: name (exact)
    dontpanic.i686: Very simple library and executable used in testing Alien::Base

Double-clicking on "dontpanic" word selected "dontpanic.i686:",
including the colon character. That made dificult to copy and paste
the found packages.

While this is a problem of the terminal emulator and later the reporter
found a setttings of his terminal not to do it, I think we should use
a pure white-space separator to help people with not so advanced
terminals.

This patch replaces the ": " separator with a single tabulation
character:

    $ dnf5 search dontpanic
    Updating and loading repositories:
    Repositories loaded.
    Matched fields: name (exact)
    dontpanic.i686	Very simple library and executable used in testing Alien::Base

Resolves #2166
This commit is contained in:
Petr Písař 2025-04-09 09:51:34 +02:00 committed by pkratoch
parent bb05c49822
commit f5082772c4
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ void print_search_results(const SearchResults & results) {
} else {
std::cout << highlight(package.get_name()) << "." << package.get_arch();
}
std::cout << ": " << highlight(package.get_summary()) << std::endl;
std::cout << "\t" << highlight(package.get_summary()) << std::endl;
}
}
}