fix(zsh): resolve config path dynamically to open the correct file for editing#2919
Merged
tusharmath merged 4 commits intomainfrom Apr 10, 2026
Merged
fix(zsh): resolve config path dynamically to open the correct file for editing#2919tusharmath merged 4 commits intomainfrom
tusharmath merged 4 commits intomainfrom
Conversation
362b607 to
a595f6d
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.
Summary
Fix ZSH config edit action opening the wrong file by resolving the config path dynamically via
forge config pathinstead of hardcoding~/forge/.forge.toml.Context
The ZSH shell plugin's
_forge_action_config_editfunction had a hardcoded path of~/forge/.forge.toml. This was incorrect for users whose config lives at the new canonical location~/.forge/.forge.toml, or in a custom path set viaFORGE_CONFIG. As a result, running the config edit action from ZSH would open (or create) the wrong file, silently ignoring any existing configuration.Changes
_forge_action_config_editnow callsforge config pathto resolve the correct config file path at runtime, respectingFORGE_CONFIG, the new~/.forgelocation, and the legacy~/forgefallbackforge config pathsubcommand that prints the resolved path to the global config fileforge config migratesubcommand to migrate the legacy~/forgedirectory to~/.forgewriteln_titleandTitleFormatfor consistent styling-y/--yesflag fromworkspace init— confirmation is now always promptedKey Implementation Details
forge config pathis the single source of truth for where the config file lives. The ZSH plugin shells out to it and fails fast with a clear error if the binary is unavailable or returns an empty path. Directory creation also uses the dynamically resolved path rather than the hardcoded one.Testing
Links