feat: add session name template support#357
Open
ethanpailes wants to merge 1 commit intomasterfrom
Open
Conversation
3087a3f to
6ad63c3
Compare
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: I used '#{var}' as the substitution
syntax. This seems clearly better than '${var}' substitution because it
avoids weird nesting concerns in shells, but '#' is the comment char in
shells so now I'm wondering if we should use a different syntax. Perhaps
'@{var}' since that can be a bare work in shells?
BREAKING: this breaks shpool-protocol
6ad63c3 to
41d320d
Compare
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.
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:
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: I used '#{var}' as the substitution syntax. This seems clearly better than '${var}' substitution because it avoids weird nesting concerns in shells, but '#' is the comment char in shells so now I'm wondering if we should use a different syntax. Perhaps '@{var}' since that can be a bare work in shells?