Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Decimo CLI to avoid short-flag collisions with negative expressions by uppercasing short options, and adds new input modes for evaluating expressions from stdin (pipe) and from a file.
Changes:
- Uppercase all short option names (
-P/-S/-E/-D/-R) and remove the--padshort flag to prevent collisions with expressions like-e,-pi,-sin(1). - Add pipe mode (read/evaluate expressions from stdin, one per line) and file mode (evaluate expressions from a
-F/--filepath). - Extend integration + unit tests and update CLI documentation/changelog to reflect the new UX.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_cli.sh | Updates short flags and adds integration coverage for pipe mode and -F/--file mode. |
| tests/cli/test_io.mojo | Adds unit tests for new I/O helpers (line splitting, comment stripping, etc.). |
| src/cli/main.mojo | Implements mode detection (expr vs pipe vs file), new -F/--file option, and updated short flags. |
| src/cli/calculator/io.mojo | Introduces stdin/file reading and line-processing utilities used by pipe/file modes. |
| src/cli/calculator/init.mojo | Re-exports new I/O utilities from the calculator package. |
| docs/user_manual_cli.md | Documents new short flags and adds an “Input Modes” section. |
| docs/plans/cli_calculator.md | Updates CLI plan/status to mark pipe/file input and uppercase short flags as implemented. |
| docs/changelog.md | Notes pipe mode + file mode additions under “Unreleased”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR updates the Decimo CLI to avoid short-flag collisions with negative expressions by uppercasing short options, and adds new stdin (pipe) + file-based input modes for evaluating multiple expressions.
Changes:
- Uppercase short flags for formatting/computation options (
-P/-S/-E/-D/-R) and remove the--padshort flag to prevent collisions with expressions like-e,-pi,-sin(1). - Add pipe mode (read/evaluate expressions from stdin, one per non-empty non-comment line) and file mode (
-F/--file). - Extend integration/unit tests and update docs/changelog/plans for the new CLI UX.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_cli.sh | Updates integration tests for new short flags; adds pipe/file mode integration coverage. |
| tests/cli/test_io.mojo | Adds unit tests for new I/O helpers (splitting, comment stripping, etc.). |
| src/cli/main.mojo | Implements new input mode detection and pipe/file execution paths; updates CLI flags and help tips. |
| src/cli/calculator/io.mojo | Introduces stdin/file reading helpers and line filtering utilities for pipe/file mode. |
| src/cli/calculator/init.mojo | Re-exports the new calculator I/O utilities. |
| docs/user_manual_cli.md | Updates option reference and documents the three input modes + new flag casing. |
| docs/plans/cli_calculator.md | Updates plan/status notes to reflect completed pipe/file mode and new short flags. |
| docs/changelog.md | Adds unreleased changelog entries describing pipe/file mode additions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR updates the Decimo CLI to avoid short-flag collisions with negative expressions by uppercasing short options, and adds new stdin (pipe) + file-based input modes for evaluating multiple expressions.
Changes:
-P/-S/-E/-D/-R) and remove the--padshort flag to prevent collisions with expressions like-e,-pi,-sin(1).-F/--file).