Skip to content

#1627: Removed feedback_to_output settable and made pfeedback consistent#1647

Open
bambu wants to merge 14 commits intomainfrom
1627-silence-settable
Open

#1627: Removed feedback_to_output settable and made pfeedback consistent#1647
bambu wants to merge 14 commits intomainfrom
1627-silence-settable

Conversation

@bambu
Copy link
Copy Markdown
Contributor

@bambu bambu commented Apr 23, 2026

Description

This PR removes the feedback_to_output settable. It also does the following:

  • pfeedback always outputs to self.stdout when the quiet settable is Falsae
  • cmd2 now makes more consistent use of peedback for non-essential output that is silenceable
  • Status into that we don't want to be re-directable, like elapsed timing data, now outputs to stderr, but without any color or style
  • Improve user experience of the set command by consolidating output into 1 line and allowing for the output to be hidden when quiet is set. The previous output was overly verbose (three lines) and could not be silenced.

Closes #1627

bambu added 3 commits April 22, 2026 09:48
…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.
@bambu bambu self-assigned this Apr 23, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.52%. Comparing base (715b57d) to head (70051de).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1647      +/-   ##
==========================================
- Coverage   99.52%   99.52%   -0.01%     
==========================================
  Files          21       21              
  Lines        4817     4813       -4     
==========================================
- Hits         4794     4790       -4     
  Misses         23       23              
Flag Coverage Δ
unittests 99.52% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kmvanbrunt
Copy link
Copy Markdown
Member

@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 settable could be anything, including an entire command line to run a tool. If we are still going to display both the previous and new value, I think they need to be on separate lines.

Help me understand the reason behind this change. Are you running set a lot in scripts and seeing a lot of output or something?

Comment thread cmd2/cmd2.py
New format looks like:

```sh
myapp> set allow_style always
allow_style: 'Terminal'
          -> 'Always'
```

Where "'Terminal'" is red and "'Always'" is green.

This is still more abbreviated than the original format, but not as abbreviated as putting everything on one line. Moreover, it preserves the more colorful diff-style display and the switch to using pfeedback.
@tleonhardt
Copy link
Copy Markdown
Member

tleonhardt commented Apr 27, 2026

@bambu @kmvanbrunt
I pushed a change which is a compromise which attempts to preserve the intent of the change in this PR but address the concerns brought up. Below is an image of what the new format looks like.

Screenshot 2026-04-27 at 11 38 18 AM

@tleonhardt tleonhardt changed the title #1627: Consolidated set command output and added support for quiet mode #1627: Removed feedback_to_output settable and made pfeedback consistent May 6, 2026
@tleonhardt
Copy link
Copy Markdown
Member

@bambu
@kmvanbrunt and I chatted about how to best address the intent of this PR. We ended up making more changes because we felt like the overall issue was bigger than just the set command output. Now pfeedback has a single purpose and timing output isn't gated by two separate settables. Please let us know what you think about the changes.

@kmvanbrunt kmvanbrunt force-pushed the 1627-silence-settable branch from 9909afb to 9105ed2 Compare May 6, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settable output is overly verbose and lacks a silent mode

3 participants