Skip to content

acp_thread: If available, use git bash over powershell in terminal tool - #39466

Merged
Veykril merged 1 commit into
mainfrom
push-pztwqknoxntm
Oct 6, 2025
Merged

acp_thread: If available, use git bash over powershell in terminal tool#39466
Veykril merged 1 commit into
mainfrom
push-pztwqknoxntm

Conversation

@Veykril

@Veykril Veykril commented Oct 3, 2025

Copy link
Copy Markdown
Member

Release Notes:

  • When git bash is installed, agents will now use that over powershell when invoking terminal commands

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Oct 3, 2025
@Veykril Veykril changed the title acp_thread: Use git bash over powershell if available in terminal tool acp_thread: If available, use git bash over powershell in terminal tool Oct 3, 2025
@Veykril
Veykril force-pushed the push-pztwqknoxntm branch 2 times, most recently from 846119d to 4baf56c Compare October 3, 2025 14:35
os: std::env::consts::OS.to_string(),
arch: std::env::consts::ARCH.to_string(),
shell: get_default_system_shell(),
shell: ShellKind::new(&get_default_system_shell_preferring_bash()).to_string(),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes it so we name the shell by name only in the prompt, not by path. That is:

  • /bin/sh becomes just sh
  • /bin/bash becomes just sh
  • C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe becomes just powershell
  • C:\Program Files\Git\bin\bash.exe becomes just sh

This feels more correct to me, the concrete path is not relevant for the agent as far as I can tell. Just the type of the shell

@Veykril
Veykril force-pushed the push-pztwqknoxntm branch from 4baf56c to 4111996 Compare October 5, 2025 07:19
@Veykril
Veykril force-pushed the push-pztwqknoxntm branch 2 times, most recently from 71e7259 to cfd98e3 Compare October 6, 2025 09:08
@Veykril
Veykril force-pushed the push-pztwqknoxntm branch from cfd98e3 to 7c3302c Compare October 6, 2025 09:51
@Veykril
Veykril merged commit 4bd7ef8 into main Oct 6, 2025
23 checks passed
@Veykril
Veykril deleted the push-pztwqknoxntm branch October 6, 2025 11:39
cole-miller added a commit that referenced this pull request Oct 13, 2025
This applies the same change as #39466 to the terminal codepath for
external agents.

Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
reflectronic pushed a commit that referenced this pull request Oct 14, 2025
This applies the same change as #39466 to the terminal codepath for
external agents.

Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…ol (zed-industries#39466)

Release Notes:

- When git bash is installed, agents will now use that over powershell
when invoking terminal commands
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…#40150)

This applies the same change as zed-industries#39466 to the terminal codepath for
external agents.

Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant