zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.46k stars 3.12k forks source link

Use user-specified terminal for all tasks as a default (or provide additional setting to specify one) #20973

Open Poldraunic opened 1 day ago

Poldraunic commented 1 day ago

Check for existing issues

Describe the feature

At the moment, user can specify which shell program to use when creating new terminal. This configuration is only applied when terminal is explicitly opened by user. This is behavior is documented, but the way it is worded can be somewhat misleading - I for one thought it would apply to all terminals regardless of who opened it.

And so by default all tasks are ran with system shell. If one wishes to use same shell configuration for all tasks, they'd have to copy-paste this configuration for every single tasks. We all know what programmers think of code duplication without a good reason.

I can think of two solutions:

  1. Use whatever shell is specified in user settings for all tasks as a default. This is a breaking change which can result in some unintended effects for users. I think this is fine because no guarantees have been made yet, but it up to you to decide of course.
  2. More safe (and probably flexible) solution would be to introduce additional user setting for tasks only. It should take same configuration as terminal.

Regardless of solution chosen, user would still be able to override shell configuration for any given task.


This is important to me because on Windows bundled PowerShell is rather limited and outdated. Anyone who does serious coding on Windows most likely has modern PowerShell installed. IMO the most important distinction between them is that modern one has support for pipeline chaining (&& and ||). This makes it trivial to write tasks like build foo && cd foo && ./foo. In a way it also makes them a little bit more portable which is a nice bonus.

Environment

Zed: v0.162.3 (Zed) OS: Windows 10.0.19045 Memory: 31.9 GiB Architecture: x86_64 GPU: NVIDIA GeForce GTX 1050 Ti || NVIDIA || 546.33

If applicable, add mockups / screenshots to help present your vision of the feature

No response