feat(banner): hide zsh install tip when plugin is already loaded#3100
Open
EmojiPati wants to merge 2 commits intotailcallhq:mainfrom
Open
feat(banner): hide zsh install tip when plugin is already loaded#3100EmojiPati wants to merge 2 commits intotailcallhq:mainfrom
EmojiPati wants to merge 2 commits intotailcallhq:mainfrom
Conversation
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.
Summary
When `forge` is launched from a shell that has already sourced the zsh plugin, the `TIP: For the best experience, use our zsh plugin!` banner is noise — the user already has it configured. Detect that at runtime and skip the encouragement block.
Context
The generated zsh plugin and theme scripts already write `_FORGE_PLUGIN_LOADED` and `_FORGE_THEME_LOADED` timestamps so `forge zsh doctor` can introspect them (`crates/forge_main/src/zsh/plugin.rs:47`, `crates/forge_main/src/zsh/plugin.rs:58`). However the assignments were not `export`ed, so the markers stayed shell-local and were invisible to any child `forge` process. That made runtime detection from inside forge itself impossible.
Changes
Behavior
Testing
```bash
cargo test -p forge_main --lib banner::
cargo test -p forge_main --lib zsh::plugin::
cargo clippy -p forge_main --lib --tests -- -D warnings
```