[FR] Allow custom arguments for GOOSE_SHELL
- 主要言語
- Rust
- スター
- 54.2k
- フォーク
- 6.2k
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 240
説明
Add the ability to pass custom arguments to the shell or override default ones when using GOOSE_SHELL.
**What problem would this solve?**
Hard-coded shell arguments block customization. Specifically, when setting GOOSE_SHELL to pwsh, the system forces the `-NoProfile` flag. This prevents Windows users from loading a profile to strip out default aliases that conflict with Linux-style tools.
I imagine there are Linux users who would benefit from this as well, since there are many changes that could be made to the environment that might be hindering (or beneficial).
**What would a good outcome look like?**
Users would be able to use `pwsh` as shell for Goose while ensuring Linux-style tools work without alias conflicts.
**Possible approaches**
- Allow a custom profile script path to run after the shell boots
- Allow users to pass custom arguments via a new environment variable like `GOOSE_SHELL_ARGS`
- Add a configuration setting to toggle the `-NoProfile` flag on or off
- This one isn't ideal because my profile does some things I wouldn't want, but I could change it temporarily; it's better than nothing.
**Additional context**
Even when extensions are supplying function tools, LLMs will sometimes want to use one of these Linux-style tools instead, and when it attempts to use one and it's told the arguments are invalid (because `pwsh`'s aliases don't honor the same arguments) it confuses the AI quite a bit and it will start going in circles.
Furthermore, it's easy to actually supply these Linux-style tools now thanks to projects like uutils's [coreutils](https://github.com/uutils/coreutils) which compiles a full set of native Windows binaries that match up with the GNU toolset so often used in Linux shells.
Making these tools available to the LLMs could go a long way in reducing the amount of confusion they experience when working in a Windows environment.
I could potentially even have it load a custom Goose-only profile that sets aliases for tools I don't keep on my `PATH` due to name conflicts with tools that Windows supplies (e.g. `find`, `rmdir`, `sort`, …), which would break many `BAT`/`CMD` files.
* * *
- [x] I have verified this does not duplicate an existing feature request
コントリビューションガイド
調査の方向性
Look for where GOOSE_SHELL is used to spawn shell processes, likely in a command execution module. The code currently passes hardcoded arguments like `-NoProfile` for pwsh. The task is to modify that logic to read from a new environment variable (e.g., GOOSE_SHELL_ARGS) or a configuration setting, and append or replace arguments accordingly. Check existing tests for shell execution to ensure the change doesn't break existing behavior.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell, rust, shell
- 領域
- cli, developer-experience, tooling
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 65/100