-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search: Do not separate a package from a summary with a colon #2190
base: main
Are you sure you want to change the base?
Conversation
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 rpm-software-management#2166
Yeah, I think we can change it this way. Will you prepare a patch that adjusts the tests? It affects dnf-behave-tests/dnf/search.feature and dnf-behave-tests/dnf/search-sort.feature . |
I will prepare a patch for the tests. |
We can merge this but note there is a community PR already that changes the search output to use libsmartcols: #2180. That PR would also need accompanying changes to ci-dnf-stack. |
Implemenation detail: Bahave does not expand escape sequences in multi-line texts associated with a step. Hence this patch uses literal tabulation characters (U+0009) instead of "\t" sequences. For: rpm-software-management/dnf5#2190 Resolves: rpm-software-management/dnf5#2166
If the smartcols-formatted output is what we want, then this pull request should not be merged. |
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:
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:
Resolves #2166
Do we want this change?
I guess we will need to adjust dnf-behave-tests/dnf/search.feature which again matches output literally.