CLI flags should not be case-sensitive (`apiops -v` fails, `-V` works)
- Ngôn ngữ chính
- TypeScript
- Star
- 26
- Fork
- 9
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 20
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Start at the TypeScript CLI argument-parsing entry point and reproduce the behavior with `apiops -v` and `apiops -V` in the reported environment. Trace how `-V` and `--version` are registered; done means lowercase `-v` also prints the installed version without breaking existing flags.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- node.js, typescript
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 58/100