feat: add automatic env var reload to prompt hooks - #426
Merged
Merged
Conversation
ethanpailes
force-pushed
the
add-env-autoreload
branch
7 times, most recently
from
September 3, 2026 19:39
7d15432 to
96fba5b
Compare
maxhbooth
approved these changes
Sep 10, 2026
| ) | ||
| .context("writing session env")?; | ||
| let content = format_forward_env(&header.local_env); | ||
| fs::write(&session_env_file, content).context("writing session env")?; |
There was a problem hiding this comment.
should you do an atomic write (i.e. write to tmp and then rename) instead?
Contributor
Author
There was a problem hiding this comment.
good idea, done
| SHPOOL__OLD_PROMPT_COMMAND=("${{PROMPT_COMMAND[@]}}") | ||
| SHPOOL__OLD_PS1="${{PS1}}" | ||
| function __shpool__prompt_command() {{ | ||
| local ret=$? |
There was a problem hiding this comment.
nit: would it make sense to also grab the $PIPESTATUS?
Contributor
Author
There was a problem hiding this comment.
Oh, good point. Updated.
ethanpailes
force-pushed
the
add-env-autoreload
branch
4 times, most recently
from
September 11, 2026 03:30
a65d9d8 to
5d83476
Compare
This patch adds automatic env var reloading to the default prompt hook shell shims. Previously, you had to set this up yourself manually if you wanted it. This should provide a much more seemless experience. Closes #111
ethanpailes
force-pushed
the
add-env-autoreload
branch
from
September 11, 2026 03:32
5d83476 to
1e13ac5
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
#111
AI Policy Ack
Ack
This PR was:
Description
This patch adds automatic env var reloading to the default prompt hook shell shims. Previously, you had to set this up yourself manually if you wanted it. This should provide a much more seemless experience.
Closes #111