feat: in the shell tool, enable fish/nu shells and extend dynamic shell naming to all POSIX shells#278
Open
ariane-emory wants to merge 157 commits into
Open
Conversation
Remove the fish/nu blacklist so commands execute in the user's actual shell. Previously, fish and nu were blacklisted and commands would fall back to zsh/bash, causing the tool description to incorrectly report the shell being used. Changes: - Remove fish/nu blacklist from bash.ts shell detection - Remove unused BLACKLIST constant and Shell.acceptable() from shell.ts - Add fish shell test case to bash.test.ts Resolves anomalyco#4866
# Conflicts: # packages/opencode/src/shell/shell.ts # packages/opencode/src/tool/bash.ts
…ynamic-naming # Conflicts: # packages/opencode/test/tool/shell.test.ts
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.
What does this PR do?
Resolves anomalyco#4866
Dev recently refactored the Bash tool into a generic Shell tool with shell-aware prompts for PowerShell and cmd. However, two gaps remain:
-ccommand flag."bash command"/"bash commands"/"git bash commands"for all other shells.This PR fixes both issues:
${name}) to the default POSIX shell profile, so fish users see"fish command", zsh users see"zsh command", etc.Benefits
"fish","zsh","nu") instead of always seeing"bash", reducing the "shell rediscovery loop" where the model tries bash syntax on a non-bash shell