taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

add convenience feedback funtion for sync messages

Open sebu06 opened this issue 4 years ago • 1 comments

Description

I added a convenience function to output feedback from the sync command, which outputs to stdout instead of stderr, see issue #1921 . Howevver, I'm wondering if it is correct that footnotes are output to std::cerr

Context.cpp:674

    if (verbose ("footnote"))
    {
      for (auto& f : footnotes)
        if (color ())
          std::cerr << colorizeFootnote (f) << '\n';
        else
          std::cerr << f << '\n';
    }

and if for some reason the sync output should be treated as a footnote rather than usual output. In that case, I would simply check the verbosity token before the output section.

Additional information...

  • [x] Have you run the test suite? Passed: 2717 Failed: 0 Unexpected successes: 0 Skipped: 0 Expected failures: 4 Runtime: 0.42 seconds

sebu06 avatar Jul 18 '21 18:07 sebu06

@tbabej - could you maybe give me a hint why footnotes are printed to std::cerr instaad of std::cout or if this fix is good as it is?

sebu06 avatar Aug 05 '21 11:08 sebu06

@sebu06 would you like to rebase this against develop? The sync function has changed, but this helper would be useful all the same.

djmitche avatar Mar 02 '24 21:03 djmitche