Skip to content

feat: add session name template support#357

Open
ethanpailes wants to merge 1 commit intomasterfrom
session-name-templates
Open

feat: add session name template support#357
ethanpailes wants to merge 1 commit intomasterfrom
session-name-templates

Conversation

@ethanpailes
Copy link
Copy Markdown
Contributor

@ethanpailes ethanpailes commented Apr 30, 2026

Issue Link

#345

AI Policy Ack

Please ack that you have read the AI Policy
and explain your use of AI to generate this PR.

This PR was:

  • mostly or completely vibe coded
  • mostly or completely meat coded
  • bit of both

I vibed the tests, but meat coded all the application code.

Description

This patch adds support for session name templates so that you can switch multiple shpool sessions all at once.

In some sense this is a super-set of the 'shpool switch' FR. I did lay some groundwork for implementing support for that in this change, though I'm starting to wonder if templates are good enough on their own. The only extra thing that switch would bring is the ability to switch sessions you don't pre-declare as switchable with a dedicated variable up front.

One thing worth bikeshedding: At first I was thinking '${var}' for
the substitution syntax, then realized that would be weird about
nesting when it comes to shells, so I switched to '#{var}' syntax,
but then I realized that's the comment char in shells, and wound up
on '@{var}'. I'm open to other symbol/syntax ideas.

@ethanpailes ethanpailes requested a review from maxhbooth April 30, 2026 17:50
@ethanpailes ethanpailes force-pushed the session-name-templates branch 10 times, most recently from e143a6f to eaa1fbd Compare May 1, 2026 23:11
@ethanpailes
Copy link
Copy Markdown
Contributor Author

@GeoffChurch this is the session name template thing we were talking about in case you want to review or join in the syntax bikeshedding.

This patch adds support for session name templates so
that you can switch multiple shpool sessions all at once.

In some sense this is a super-set of the 'shpool switch' FR.
I did lay some groundwork for implementing support for that
in this change, though I'm starting to wonder if templates are
good enough on their own. The only extra thing that switch would
bring is the ability to switch sessions you don't pre-declare as
switchable with a dedicated variable up front.

One thing worth bikeshedding: At first I was thinking '${var}' for
the substitution syntax, then realized that would be weird about
nesting when it comes to shells, so I switched to '#{var}' syntax,
but then I realized that's the comment char in shells, and wound up
on '@{var}'. I'm open to other symbol/syntax ideas.

BREAKING: this breaks shpool-protocol since we have a new chunk kind.
@ethanpailes ethanpailes force-pushed the session-name-templates branch from eaa1fbd to 4a40633 Compare May 1, 2026 23:31
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.

1 participant