Skip to content

refactor(shell-plugin): rename _FORGE_TERM_ENABLED to _FORGE_TERM#3005

Merged
tusharmath merged 1 commit intomainfrom
rename-variable
Apr 14, 2026
Merged

refactor(shell-plugin): rename _FORGE_TERM_ENABLED to _FORGE_TERM#3005
tusharmath merged 1 commit intomainfrom
rename-variable

Conversation

@tusharmath
Copy link
Copy Markdown
Collaborator

@tusharmath tusharmath commented Apr 14, 2026

Summary

Rename the internal shell-plugin variable _FORGE_TERM_ENABLED to _FORGE_TERM and its corresponding user-facing environment variable FORGE_TERM_ENABLED to FORGE_TERM for a shorter, more consistent naming convention.

Context

The variable _FORGE_TERM_ENABLED served as the master switch for terminal context capture (preexec/precmd hooks). The _ENABLED suffix was redundant — the variable's boolean value already communicates enablement state. Dropping it aligns with the naming style of other _FORGE_TERM_* variables in the plugin (e.g., _FORGE_TERM_MAX_COMMANDS, _FORGE_TERM_COMMANDS) and reduces visual noise in the shell config.

Changes

  • Renamed _FORGE_TERM_ENABLED_FORGE_TERM across all shell plugin files
  • Renamed the user-facing env var FORGE_TERM_ENABLEDFORGE_TERM in config.zsh
  • Updated all reference sites in config.zsh, context.zsh, and helpers.zsh

Key Implementation Details

The rename is purely mechanical — no logic, defaults, or behavior changed. The variable still defaults to "true" and controls registration of the preexec/precmd hooks as well as terminal command context forwarding to the forge process.

Testing

# Source the plugin and verify terminal context capture still works
source shell-plugin/forge.plugin.zsh

# Confirm the new variable name is respected
export FORGE_TERM=false
# Run a command — context should NOT be captured

export FORGE_TERM=true
# Run a command — context SHOULD be captured

@github-actions github-actions bot added the type: refactor Code refactoring and restructuring. label Apr 14, 2026
@tusharmath tusharmath merged commit b2644d3 into main Apr 14, 2026
10 checks passed
@tusharmath tusharmath deleted the rename-variable branch April 14, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: refactor Code refactoring and restructuring.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant