GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — feat(bash): add env parameter for setting environment variables · Issue #11065 · anomalyco/opencode Closed Labels discussionUsed for feature requests, proposals, ideas, etc. Open discussion DescriptionFeature hasn't been suggested before.
Describe the enhancement you want to requestIssue DescriptionProblemPlugins cannot inject environment variables into bash commands. There are a number of current feature requests which could be done with plugins if that was allowed, and it's a cheap / low risk fix. Use CaseI want to build a plugin that sets Currently, the only workaround is prepending Proposed SolutionAdd an optional Example Usage"tool.execute.before": async (input, output) => { if (input.tool !== "bash") return const session = await ctx.client.getSession(input.sessionID) const isSubagent = session?.parentID != null output.args.env = { AGENT_MODE: isSubagent ? "secondary" : "primary", AGENT_ID: input.sessionID, } } Implementation
This would also allow issues like #10247 to be done in a plugin, thus reducing the need for specialized niche things in opencode. Reacted by Kelvin Rosado, Santiago M. Mola, Kornel and Aurélien Franky Activity
MetadataMetadataAssigneesLabelsdiscussionUsed for feature requests, proposals, ideas, etc. Open discussion TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |