Azure / Azure/apiops-cli

CLI flags should not be case-sensitive (`apiops -v` fails, `-V` works)

未关闭
#224 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Bug effort:S P2
主要语言
TypeScript
星标
26
派生
9
平均合并
1 天 3 小时
30 天内合并 PR
20

描述

### Command that triggered the bug

`apiops -v`

### Expected behavior

Both `apiops -v` and `apiops -V` should print the installed CLI version. Users commonly expect short flags to be case-insensitive, and `-v` is the conventional lowercase form for "version" across most CLIs.

### Actual behavior

Only `apiops -V` prints the version. `apiops -v` fails / is not recognized as the version flag. This is inconsistent and surprising for users.

Ideally, command-line short flags in general should not be case-sensitive — or at minimum, `-v` should be aliased to `-V` (and `--version`) for the version output.

### apiops CLI version

0.4.0-alpha.1

### Environment details

- OS: Windows 11
- Shell: PowerShell 7.6.3
- Node.js: v24.0.1
- npm: 11.11.0

### CI/CD environment

N/A (running locally)

### Is this bug blocking you?

No

贡献指南

打开贡献指南

调研方向

从 TypeScript CLI 参数解析入口开始,在报告的环境中使用 `apiops -v` 和 `apiops -V` 重现该行为。跟踪 `-V` 和 `--version` 是如何注册的;完成的标准是小写的 `-v` 也能输出已安装的版本,同时不破坏现有 flags。

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

评估

技术栈
node.js, typescript
领域
cli
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
基本清楚
新手友好度
58/100

把新 issue 发到你的邮箱

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