✨ feat(cli): add __FILE_NAME__ and __FILE_STEM__ env vars for file context#1343
Merged
✨ feat(cli): add __FILE_NAME__ and __FILE_STEM__ env vars for file context#1343
Conversation
…ntext - Adds __FILE_NAME__ and __FILE_STEM__ to engine for each file processed - Updates documentation to reflect new environment variables Closes #1342
Contributor
There was a problem hiding this comment.
Pull request overview
Adds additional per-file context variables to the mq CLI execution engine so mq queries can reference the current input file’s name/stem, and documents the new variables.
Changes:
- Define
__FILE_NAME__and__FILE_STEM__for file-based executions inmq-run. - Update the reference docs to list the new environment variables.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/books/src/reference/types_and_values.md | Documents __FILE_NAME__ and __FILE_STEM__ alongside __FILE__. |
| crates/mq-run/src/cli.rs | Sets new runtime string values on the engine based on the current file being processed. |
Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1342