#1627: Consolidated set command output and added support for quiet mode#1647
#1627: Consolidated set command output and added support for quiet mode#1647
Conversation
…utput. (#1627) * Made the set command silent on success by default. * Added a -v/--verbose flag to the set command to display change confirmations. * Consolidated the verbose output into a single, colorized line (e.g., param: old -> new). * Updated unit tests to reflect the new default behavior and output format.
* Updated do_set to use pfeedback for change confirmations, allowing it to be silenced via the quiet setting. * Updated unit tests to match the new output format and verify quiet mode behavior.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1647 +/- ##
==========================================
+ Coverage 99.47% 99.49% +0.02%
==========================================
Files 21 21
Lines 4758 4759 +1
==========================================
+ Hits 4733 4735 +2
+ Misses 25 24 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@bambu I need to consider this. I don't think the previous output was too verbose. I'm OK if we reformat it, but the amount of information displayed was, in my view, reasonable. I'm also concerned about the new output being on one line. A Help me understand the reason behind this change. Are you running |
| (f"{settable.value!r}", "green"), | ||
| ) | ||
| self.pfeedback(feedback_msg) | ||
|
|
There was a problem hiding this comment.
I see 3 fundamental distinct changes here:
- Output is more abbreviated - 1 line instead of 2
- Previous and new values are colorized to enhance readability as a diff
pfeedbackis used instead ofpoutput
In general I think the later two are unquestionably welcome changes.
For most use cases I like the more succinct single-line output format. However, I can envision a theoretical edge case where both the old and new values are many characters such that fitting on a single line might be problematic. I'd be fine with a 2-line solution or with an intelligent splitting based on terminal width.
Description
Improve user experience of the set command by consolidating output into 1 line and allowing for the output to be hidden when
quietis set. The previous output was overly verbose (three lines) and could not be silenced.Changes
Example Behavior
Closes #1627