dry-rb/dry-cli

Feature request: colorized output

Open

#121 创建于 2022年6月27日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)Ruby (39 fork)github user discovery
bughelp wanted

仓库指标

Star
 (354 star)
PR 合并指标
 (PR 指标待抓取)

描述

This is a feature I started working on long ago for Hanami: https://github.com/hanami/hanami/pull/906

There could be two parts to this:

  • Colorizing the output of dry-cli, like each command's help and the list of subcommands
  • Adding something like say that users of the library can use to print in color (instead of using print).

e.g.

say "create", color: :red

This should probably be like print rather than puts (no trailing newline), since people should be able to print in several colors on one line.

The concrete use-case for this could be like hanami/hanami#906, being able to colorize the output of file generation for Hanami.

Is this something we'd be interested in adding to dry-cli? Any thoughts on the API?

贡献者指南