Skip to content

Commit e4af68d

Browse files
authored
Merge pull request #51 from zhujian0805/main
Adjust CLI docs and tests for long-form options
2 parents 481e7b3 + 59a0b28 commit e4af68d

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ Marketplace extensions for supported assistants (GitHub repos or local paths).
140140
| `cam config` | `cf` | Manage CAM's internal configuration files |
141141
| `cam version` | `v` | Display current version |
142142

143+
Note: non-boolean CLI options are long-form only. For example, use `--config` and `--scope` (not `-c` or `-s`).
144+
143145
---
144146

145147
## Governance & Quality
@@ -162,4 +164,4 @@ CAM is governed by a speckit-driven development framework ensuring consistent, h
162164

163165
## License
164166

165-
This project is licensed under the MIT License.
167+
This project is licensed under the MIT License.

docs/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
- `cam prompt install` - Install configured prompts to app files
1818
- `cam prompt status` - Enhanced to show file paths
1919

20+
### Fixed
21+
- **CLI Option Flags**: Removed unsupported short flags from non-boolean options to align with Typer behavior. Use `--config` and `--scope` instead of `-c` and `-s`.
22+
2023
## [1.1.0] - 2024-12-30
2124

2225
### Added

tests/test_cli_options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ def test_config_file_option(self):
3232
assert isinstance(CONFIG_FILE_OPTION, OptionInfo)
3333
assert CONFIG_FILE_OPTION.default is None
3434
assert "--config" in CONFIG_FILE_OPTION.param_decls
35-
assert "-c" in CONFIG_FILE_OPTION.param_decls
35+
assert "-c" not in CONFIG_FILE_OPTION.param_decls
3636

3737
def test_config_option(self):
3838
"""Test CONFIG_OPTION is properly defined."""
3939
assert isinstance(CONFIG_OPTION, OptionInfo)
4040
assert CONFIG_OPTION.default is None
4141
assert "--config" in CONFIG_OPTION.param_decls
42-
assert "-c" in CONFIG_OPTION.param_decls
42+
assert "-c" not in CONFIG_OPTION.param_decls
4343
assert "settings.conf" in CONFIG_OPTION.help
4444

4545
def test_debug_option(self):
@@ -80,7 +80,7 @@ def test_scope_option(self):
8080
assert isinstance(SCOPE_OPTION, OptionInfo)
8181
assert SCOPE_OPTION.default == "user"
8282
assert "--scope" in SCOPE_OPTION.param_decls
83-
assert "-s" in SCOPE_OPTION.param_decls
83+
assert "-s" not in SCOPE_OPTION.param_decls
8484

8585
def test_target_option(self):
8686
"""Test TARGET_OPTION is properly defined."""
@@ -172,4 +172,4 @@ def test_arguments_have_help_text(self):
172172

173173
for arg in arguments:
174174
assert arg.help is not None
175-
assert len(arg.help.strip()) > 0
175+
assert len(arg.help.strip()) > 0

0 commit comments

Comments
 (0)