Usage help: "Inherited options" heading might be confusing in some contexts

未关闭 适合新手
#239 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
cli, clojure
领域
cli

调研方向

负载没有指明渲染用法文本的文件,因此请先在仓库中搜索帮助输出代码里的 "Inherited options" 字符串。检查标题是如何选定的,以及仅针对根命令的情况能否显示 "Global options",同时嵌套命令保留当前措辞。完成的标准是:仅根命令的帮助输出显示新标题,并且现有的帮助输出测试已相应更新。请先与维护者确认,因为该 issue 询问此更改是否合理。

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

描述

Issue

The "Inherited options" heading in usage text is technically correct.
It describes the way bb cli shares options downward in the command tree.
But maybe we can avoid exposing this complex concept to innocent cli users for simpler scenarios.

Scenario

Take the common case where we only have inherited options from the root.
An example usage help from bbin:

$ bbin install --help
Version: 0.2.5

Usage: bbin install [options] <source>

Install a script

Arguments:
  <source>  URL/file/project to install

Options:
      --as           Executable name to give installed script
      --git/url      Git URL of project (by default, inferred from project)
      --git/sha      Git sha for --git/url
      --git/tag      Git tag for --git/url
      --latest-sha   Use latest sha for --git/url
      --mvn/version  Maven version for project
      --local/root   Local directory for project
  -T, --tool         Install script using tool mode
      --ns-default   :ns-default to be used for the installed script for --tool mode only
      --main-opts    Edn for :main-opts to use for the installed script
      --dry-run      Give a data view of what will happen without installing
      --edn          Emit output in edn format

Inherited options:
  --color  Use color/styling in output (--no-color to disable)
  --plain  Use plain output (no color, no table decorations)

Run "bbin --help" for global options.

See https://github.com/babashka/bbin README for example usages.

I think a user would be better served by a heading of "Global options:" for this scenario.

Whatcha think?

Does this make sense?

主要语言
Clojure
星标
295
派生
22
平均合并
1 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

babashka/cli 的其他 Issue

查看 babashka/cli 的全部 Issue

相似的 Issue

更多 Clojure Issue

把新 issue 发到你的邮箱

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