Bug 2172881 - RFE: please stop printing usage information when an invalid option is given
Summary: RFE: please stop printing usage information when an invalid option is given
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-23 11:53 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2023-06-29 13:43 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-29 13:43:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2023-02-23 11:53:24 UTC
Description of problem:
I'm filing this an "RFE", because it's a matter of opinion, but I'm pretty sure that changing the behaviour would be beneficial to users.

Right now dnf5 prints full --help output when it encounters an invalid option. This means that the actual useful part that the user needs to look at (the error message) is obscured by a few pages of output about all possible options. This is only going to get worse as the more functionality is implemented and the length of --help output grows. (In particular, this was clearly visible in the excellent talk about dnf5 at FOSDEM: during the demo one of the presenters made a typo and had to scroll up quite a bit to figure out what went wrong.)  Please just stop doing this. The user knows they can use --help or man or google if they want to learn about all available options.

(There's also the additional issue that the --help output is written to stdout, which is wrong, see rhbz#2172868.)

Version-Release number of selected component (if applicable):
dnf5-5.0.6-1.fc39.x86_64

Actual results:
~40 lines of output after a typo

Expected results:
Just the error message.

Comment 1 Pavla Kratochvilova 2023-06-29 13:43:33 UTC
I believe this is fixed by https://github.com/rpm-software-management/dnf5/commit/93bf7fa260ac95f075fa9de9a26507627a7d02bc which should already be in rawhide, so I'm closing this.


Note You need to log in before you can comment on or make changes to this bug.