Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

-h should be a global flag for --help

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

从 CLI 入口点和全局 flag 处理开始,以现有的 --help 行为作为参考。测试 fastly -h 和 fastly --help;当短 flag 显示相同的全局帮助文本且不与子命令冲突时,即视为完成。

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

描述

feature request

Is your feature request related to a problem? Please describe.

It's common and conventional for CLI tools to accept -h as a shortcut for invoking --help globally.

But we don't currently support it:

GLOBAL FLAGS
      --help             Show context-sensitive help.
  -d, --accept-defaults  Accept default options for all interactive prompts
                         apart from Yes/No confirmations
  -y, --auto-yes         Answer yes automatically to all Yes/No confirmations.
                         This may suppress security warnings
      --debug-mode       Print API request and response details (NOTE:
                         can disrupt the normal CLI flow output formatting)
      --enable-sso       Enable Single-Sign On (SSO) for current profile
                         execution (see also: 'fastly sso')
  -i, --non-interactive  Do not prompt for user input - suitable for CI
                         processes. Equivalent to --accept-defaults and
                         --auto-yes
  -o, --profile=PROFILE  Switch account profile for single command execution
                         (see also: 'fastly profile switch')
  -q, --quiet            Silence all output except direct command output.
                         This won't prevent interactive prompts (see:
                         --accept-defaults, --auto-yes, --non-interactive)
  -t, --token=TOKEN      Fastly API token (or via FASTLY_API_TOKEN)
  -v, --verbose          Verbose logging

Perhaps there are -h conflicts with subcommands?

Describe the solution you'd like

I'd like fastly -h to work globally as a shortcut for showing help text.

Describe alternatives you've considered

n/a

Additional context

n/a

主要语言
Go
星标
164
派生
81
平均合并
1 天 3 小时
30 天内合并 PR
23

环境准备

从这里开始

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

fastly/cli 的其他 Issue

查看 fastly/cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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