Skip to content

refactor(for-each): use canonical expand_shell_template helper - #2103

Merged
max-sixty merged 1 commit into
mainfrom
for-each-shell-template
Apr 12, 2026
Merged

max-sixty merged 1 commit into
mainfrom
for-each-shell-template

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Last call site still inlining the &str map conversion — fold onto the expand_shell_template helper introduced in #2095.

Follow-up from #2095 session-ending list.

This was written by Claude Code on behalf of @max-sixty

Last call site still inlining the `&str` map conversion — fold onto the
helper introduced in #2095.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit fa69aee into main Apr 12, 2026
24 checks passed
@max-sixty
max-sixty deleted the for-each-shell-template branch April 12, 2026 00:05
max-sixty added a commit that referenced this pull request Apr 12, 2026
The lazy/eager distinction in alias template expansion was unnecessary —
alias expansion always happens at execution time (in
`AliasExecCtx::run`), so `vars.*` references naturally read fresh values
from git config without special handling. The "lazy" path was
round-tripping `context_json` back to the same `HashMap` that was
serialized from `context_map`.

Removes the intermediate `HashMap<&str, &str>`, the `is_pipeline` field,
and the `template_references_var` branching. Both dry-run and execution
paths now route through `expand_shell_template`, making it the canonical
expansion path for all three consumers (hooks, aliases, pipelines).

Follow-up to #2095 and #2103.

> _This was written by Claude Code on behalf of @max-sixty_

---------

Co-authored-by: Claude <[email protected]>
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.

2 participants