QuantStack / QuantStack/git2cpp

Handle `cerr` in terminal pager

未关闭
#49 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C++
星标
6
派生
5
平均合并
4 小时 22 分钟
30 天内合并 PR
4

描述

Need to handle cerr as well as cout in terminal pager. Discussion from #46:

Ian:
We do need a strategy for what to do with cerr, but I don't know what is best yet.

Currently cerr will be written to the normal terminal buffer, so it won't be seen whilst the alternative buffer is being used but it reappears when the alternative buffer is disabled. This is perhaps not a good solution, but I don't think it is too bad for a first implementation. Some other options:

  1. Capture it and sent it to the same place as cout, it will appear in the output flow in the alternative buffer. We'd probably need to colour it to make is easily visible as it could be anywhere.
  2. Capture it and display it at the bottom of the alternative buffer for better visibility, but then there might be quite a lot of information displayed.
  3. Capture it and if anything at all is written to it we could avoid using the pager at all, just display the errors in the normal terminal flow.

Johan:
I have a preference for option 1, but I think we can discuss it in a dedicated issue and solve it in a dedicated PR so that it does not block this one, WDYT?

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

该 issue 未指出文件、测试或具体的入口点。首先定位 terminal pager 的实现并阅读 #46 中的讨论,然后确定项目接受哪种处理 cerr 的策略。完成的标准是按照该决定处理 cerr,同时不阻碍 pager 工作。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
cli
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。