warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.52k stars 376 forks source link

Support other shells like powershell / nushell / ksh / xonsh / elvish / tcsh #880

Open mandel-macaque opened 2 years ago

mandel-macaque commented 2 years ago

Discord username (optional)

mandel

Describe the bug

One of the uses cases is to allow developers that are not happy with zsh to change to a different shell. This can be rolling back to bash w(hich was the original default Mac OS X terminal) or other shells such as pwsh. 

Pwsh is a common scenario for two type of developers:

1. Windows developers that need to work on OS X.
2. Dotnet developers that are used to pwsh due to windows.

Another use case is to switch back to bash because there are some small differences between zsh and bash and in some cases, moving to zsh from bash makes certain scripts fail. As an example, we in xamarin-macios always ensure that Make does call bash and not zsh.

To Reproduce

  1. Install pwsh on the Mac using https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.2
  2. Ensure that pwsh is in your /etc/shells
  3. Change the default shell via chsh -s /usr/local/bin/pwsh
  4. Open a new Warp windows. It should load with pwsh, it does not, instead it uses zsh.

Expected behaviour

When setting the default shell of my user to a diff shell app present in /etc/shells my configuration should be respected.

Screenshots

No response

Operating System

MacOS

OS Version

12.2.1

Additional context

No response

daUnknownCoder commented 2 months ago

hey @dannyneira, what are the updates on nushell ?

dannyneira commented 2 months ago

@daUnknownCoder There is no official nushell support in Warp yet as we're working actively on pwsh support.

FWIW, a Warp user has created a WIP script to support it nushell here, but your experience may vary.

damianpowell commented 2 months ago

Here's a demo of a Powershell session running on my Mac:

Can we enable that to have a play?

Shoehorner commented 2 months ago

Is there any ETA on when Pwsh support will come to macOS?

acarl005 commented 2 months ago

We are planning on putting PowerShell support for MacOS/Linux behind an experiment feature flag. Should be out within a few weeks! Stay tuned on this issue! We'll put the command for how to toggle the hidden option on this issue.

ActuallyHappening commented 2 months ago

I would love if Nushell was supported. Its also made in Rust

acarl005 commented 2 months ago

Hey all. We've put experimental PowerShell support into the latest release v0.2024.09.17.08.02.stable_00. However, you must manually opt-in.

MacOS

In a terminal, enter this command and then restart Warp:

defaults write dev.warp.Warp-Stable ExperimentOverrides PowerShellTester::Experiment

Linux

Edit the user preferences file at ${XDG_CONFIG_HOME:-$HOME/.config}/warp-terminal/user_preferences.json and add the following key-value pair and then restart Warp:

{
  "prefs": {
    "ExperimentOverrides": "PowerShellTester::Experiment"
  }
}

Requirements

Warp does not install PowerShell for you. You must have it installed. See Microsoft's docs for installation instructions. If PowerShell is your default shell, new sessions will use it. If it isn't, you must change your Warp settings to tell it to use PowerShell:

Screenshot 2024-09-19 at 14 58 51

Please note that our "warpify subshells" feature doesn't yet support PowerShell. That means, if you have a session in a different shell and then run pwsh, that will be a "raw" experience which cannot be warpified.

Feedback

Please try it out and let us know what you think! For bugs, please don't comment on this issue. File a new issue instead.

Alternatively, you can post on our Discord channel #warp-powershell-feedback.

Thank you!

Khayoann2 commented 2 months ago

pwsh is there, Thank you.

Just a little trick about binaries. You will be directly in pwsh so you will not inherit everything from zsh like before. So you will need to enrich the env:PATH variable using that kind of thing in your powershell profile : Using zsh, i did echo $PATH

# Define additional paths to be added to the PATH environment variable
$additionalPaths = "/opt/homebrew/bin:/opt/homebrew/sbin" # copy paste the echo $PATH result from zsh

# Append the additional paths to the existing PATH environment variable
$env:PATH += [System.IO.Path]::PathSeparator + $additionalPaths
JustBarnt commented 1 month ago

Here to show my interest in seeing nushell get added as a valid shell. I use it daily and would love to see it be usable with Warp

ActuallyHappening commented 1 month ago

Still interested in Nushell being added as a supported shell for warp. Would allow me to use epic AI with scripting I understand

archcorsair commented 2 weeks ago

I’ve noticed a lot of people adding their +1s for nushell, which is awesome since we’re all pumped about it. I’m particularly curious if the warp team is interested in the idea of it. Sorry if I missed it, but I didn’t see any responses about nushell support, just powershell, etc. I’m sure everyone here would be thrilled to know that it’s on Warp’s radar, so we can finally stop bugging you so much :)

dannyneira commented 2 weeks ago

hey folks, regarding nushell support, it's not currently on the roadmap as it would require a significant amount of engineering work. We encourage you to continue to :+1: the top nushell comment as it helps us gauge interest in that particular shell. The more interest the higher likelihood we can dedicate the resources to making it happen.