Skip to content

✨ feat(cli): add __FILE_NAME__ and __FILE_STEM__ env vars for file context#1343

Merged
harehare merged 2 commits intomainfrom
feat/env-file-vars
Feb 26, 2026
Merged

✨ feat(cli): add __FILE_NAME__ and __FILE_STEM__ env vars for file context#1343
harehare merged 2 commits intomainfrom
feat/env-file-vars

Conversation

@harehare
Copy link
Copy Markdown
Owner

  • Adds FILE_NAME and FILE_STEM to engine for each file processed
  • Updates documentation to reflect new environment variables

Closes #1342

…ntext

- Adds __FILE_NAME__ and __FILE_STEM__ to engine for each file processed
- Updates documentation to reflect new environment variables

Closes #1342
Copilot AI review requested due to automatic review settings February 26, 2026 13:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in mq-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.

Copilot AI review requested due to automatic review settings February 26, 2026 13:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

@harehare harehare requested a review from Copilot February 26, 2026 14:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@harehare harehare merged commit fb55c24 into main Feb 26, 2026
13 of 14 checks passed
@harehare harehare deleted the feat/env-file-vars branch February 26, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set __FILE_NAME__ and __FILE_STEM__ at Runtime

2 participants