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

pkutaj commented 2 years ago

+1, I use powershell core for basic interaction with both win/mac; looking forward to warp.dev with posh support, else staying with oh-my-posh and iterm / windows terminal (both great, btw).

Also I suggest putting PowerShell in the name of the issue for SEO purposes, took some effort to find this issue.

sgiddings-kunzleigh commented 2 years ago

I also use PowerShell quite heavily on macOS as a DevOps Engineer working in Azure all day. I would love for some native PowerShell 7 support in Warp. I also use oh-my-posh for a custom prompt and Warp doesn't seem to like ti very much šŸ˜¬

elviskahoro commented 2 years ago

Gonna keep this open here actually.

bmitc commented 2 years ago

I found this issue by searching for it, as I too would like to use PowerShell with Warp.

There may be other issues, but the first one I noticed was the differences in how the shell prompts are handled.

For zsh:

image

For pwsh:

image

This also means that the command "blocks" (not sure exactly what Warp calls them) do not work. The entire shell history is treated as a single block:

image
sgiddings-kunzleigh commented 2 years ago

I found this issue by searching for it, as I too would like to use PowerShell with Warp.

There may be other issues, but the first one I noticed was the differences in how the shell prompts are handled.

For zsh: image

For pwsh: image

This also means that the command "blocks" (not sure exactly what Warp calls them) do not work. The entire shell history is treated as a single block: image

Yeah that is because Warp doesn't natively understand other shells, so when you spin up PowerShell or Nushell it considers that a single command. And the entire block is the "one" command of running that other shell, until you exit and return to zsh or some other shell at Warp understands.

warpdotdev-devx commented 2 years ago

Shuan's correct, we have to make a custom parser for each shell to enable Blocks, etc. Check out here GitHub discussion on creating a generic shell API: https://github.com/warpdotdev/Warp/discussions/641

bbusschots-mu commented 2 years ago

In the light theme many PowerShell prompts are all but invisible. Overall running pwsh in a Warp terminal is a recipe for crankiness!

gisantiago commented 2 years ago

+1, I use powershell to manage MS 365 and Azure functions. As a Mac user, please add powershell to warp for mac.

dannyneira commented 2 years ago

Adding XONsh to the list

Xjs commented 1 year ago

I use Elvish (https://elv.sh) and it would be really cool if it would be possible to write integrations for it.

thomrad commented 1 year ago

As a heavy powershell user, I am very looking forward to use it with warp!

f1rstC0de commented 1 year ago

+1 for NuShell support! Adding this to support list please

dannyneira commented 1 year ago

added tcsh to the list based on user feedback

Manbearpiet commented 1 year ago

pwsh would be lovely indeed!

standard-librarian commented 1 year ago

can't wait for nushell. guys, i love warp ā¤ļø.

spotandjake commented 1 year ago

excited for nutshell support

Explosion-Scratch commented 1 year ago

excited for nutshell support

:shipit: šŸ„œ

Josiah1 commented 1 year ago

I really like this terminal. The first day I started with Warp, I just abandon others. But please support other shells like tcsh so I can continue with it in my remote server.

Josiah1 commented 1 year ago

added tcsh to the list based on user feedback

But my Warp still can't work well with a remote server in tcsh env

dannyneira commented 1 year ago

@Josiah1 That is because Warp only supports bash|zsh|fish at this time, even on remote servers that must be the default shell in order for Warp to function as normal. Any updates or changes to this will be posted on this thread.

AstroOrbis commented 1 year ago

Here for nushell support, would love to see more shells added ^^

AucaCoyan commented 1 year ago

I'd love nushell support too! ā¤ļø

susl commented 11 months ago

I love Warp, but the absence of nushell support is critical.

raaaaaymond commented 11 months ago

I have to use Mac for work, just found Warp and it is so nice! It's perfect, but I was soooo so disappointed to find out it doesn't support Powershell. Please add Powershell! And Xonsh and whatever (thank you @dannyneira , I had never heard of Xonsh).

texastoland commented 11 months ago

I'd personally love Nu but see an enterprise case for PS too:

Shell ā­ šŸŸ©šŸŸ©šŸŸ©šŸŸ©šŸŸ©šŸŸ©šŸŸ©šŸŸ©šŸŸ©šŸŸ©
PowerShell 42K šŸŸ©šŸŸ©šŸŸ©šŸŸ©šŸŸ©šŸŸ©šŸŸ©8ļøāƒ£šŸŸ¢
Nushell 28K šŸŸ©šŸŸ©šŸŸ©šŸŸ©5ļøāƒ£šŸŸ¢
Xonsh 7400 1ļøāƒ£šŸŸ¢
Elvish 5200 1ļøāƒ£
tcsh 200 [^1]
KornShell 150 [^1]

[^1]: Not indicative of legacy usage

dannyneira commented 11 months ago

@texastoland "We also intend to build support for Powershell as part of building Warp on Windows." source. The plan is to build Windows version along with pwsh support after a Linux version. No firm ETA on this but we're aiming for Linux in 2024.

texastoland commented 11 months ago

we do plan on building Warp for Windows once we've wrapped up building Linux (no concrete timeline just yet). We also intend to build support for PowerShell as part of building Warp on Windows.

Great news and makes sense! It also sounds like Nu isn't a possibility in the near future šŸ„²

dannyneira commented 11 months ago

Not 100% sure about any eta, but Nushell does look very powerful and is one of Warps dependencies.

texastoland commented 11 months ago

Wiiild thanks so much for sharing šŸ™ŒšŸ¼

UserSv4 commented 10 months ago

Nushell for Warp: https://github.com/UserSv4/nushell-warp

damianpowell commented 9 months ago

+1 for PowerShell (pwsh)

For me this would be great because I use pwsh as my main shell on Linux, Mac AND Windows. I'm a .NET developer so its really useful to have a modern, object-oriented shell that natively understands .NET. That experience would be even better if I could use an equally modern terminal.

texastoland commented 9 months ago

@dannyneira I wonder if there could be an intermediate solution in the near term. I'd love to continue using Warp with Nu (or whatever) whether Warpified or not. ATM I switch to other emulators like Tabby or the built-in terminal. The most notable barriers are:

  1. The entire subshell session is clickable (or arrowable) sometimes impeding interaction
  2. I can't open a new tab with a non-default shell

I suspect there are other issues requesting these but couldn't find them for linking. If they were improved Warp would be 1 of the best options even when using unsupported shells šŸ’«

dannyneira commented 9 months ago

True maybe we can run other shell sessions like nu or pwsh in "alt-screen" mode so that the text is more easily selectable, and new tabs can be opened, etc.

Shoehorner commented 9 months ago

I would love PowerShell support. I am an IT pro in the Azure and Microsoft 365 space, and I would love to Warp but I pretty much have to use PowerShell 7.x exclusively. So, I stick with iTerm.

Explosion-Scratch commented 9 months ago

hell 7.x exclusively. So, I stick with iTerm.

I've since switched to iTerm, it has so many settings and features that make it really powerful.

itpropro commented 8 months ago

I would love to be able to use PowerShell (pwsh) in Warp privately as well as for teams. It's our default shell on MacOS and Windows as well, can't wait for it to land.

theramzay commented 8 months ago

Hello everyone, Iā€™m .Net Developer (azure functions/asp.net/sharepoint) (yes, on mac) and we have so much scripts and helpers in PowerShell 7.x.x. So yep, support for pwsh will be very appreciated!

dawdmaow commented 8 months ago

+1 for nushell

atl-ggregson commented 8 months ago

I'd love to see good support for pwsh, being an object shell there would be plenty of opportunities to light up nice capabilities in Warp.

Tom-Boscher commented 8 months ago

Any ETA about Nushell support?

acarl005 commented 7 months ago

Hey all! We're experimenting with Warp on Windows. As part of the effort, we're looking into Powershell. Here's a demo of a Powershell session running on my Mac:

demo

This is only experimental at the moment, as there's still a lot to do to make sure it works with Warp's other features.

atl-ggregson commented 7 months ago

@acarl005 Nice to see PowerShell support getting started! Thank you for sharing!

One of the major differences with PowerShell is that it's object based, so those files that are listed by Get-ChildItem are all objects. Something that would be awesome in Warp would be for it to be aware of this, being able to hover over or click on a line and get a preview of the object to see all the properties would be great. I could also imagine being able to view the pipeline output that was used to render the block.

Just some quick hints, you don't need to use Write-Output to write output to the pipeline, because that's the default behaviour; just $env:SHELL will do the job.

When using the shell interactively I'd normally use the short-forms for commands like Set-Location and Get-ChildItem, i.e. sl and gci. In scripts the long forms are preferred for clarity. You can also type a command's initials and press [tab] to complete the long form (e.g. i-rm[tab] to complete Invoke-RestMethod).

I know someone's going to point out that you can use cd, dir etc. aliases but I always suggest people use the PowerShell forms (sl, gci, etc.) because it reinforces the fact that these are quite different commands.

acarl005 commented 7 months ago

Thanks for the tips, @atl-ggregson. Nice to get help from the community :) Introspecting objects is a really cool idea. We might be able to get additional information on the pipeline output by overriding Out-Default to serialize the object metadata, parse it in Warp, and show a rich UI with that additional metadata. I'm curious if there are better ways to get this kind of information šŸ¤”

jokeyrhyme commented 7 months ago

Yep, nushell draws inspiration from PS, too, so it's built-ins also output rich data/tables

If anything, I'd expect Warp to do less work internally when dealing with PS and nushell, because there's no need to parse raw shell stdout for meaning

atl-ggregson commented 7 months ago

I'm not sure how relevant it might be, but there are tools such as Out-ConsoleGridView and Out-ObjectTree that let you view and interact with objects on the pipeline, see https://github.com/PowerShell/ConsoleGuiTools.

There's also an Out-HtmlView cmdlet which is part of this module: https://github.com/EvotecIT/PSWriteHTML.

There's also a (very old) tool that was part of Windows PowerShell called Out-GridView (the ConsoleGuiTools' Out-ConsoleGridView was inspired by it), but the port to PowerShell Core was abandoned years ago and hasn't been picked up.

glcraft commented 7 months ago

Nushell has built-ins commands to format the output with the to command

itpropro commented 7 months ago

Hey all! We're experimenting with Warp on Windows. As part of the effort, we're looking into Powershell. Here's a demo of a Powershell session running on my Mac:

demo demo

This is only experimental at the moment, as there's still a lot to do to make sure it works with Warp's other features.

This looks fantastic! If you are looking for someone who uses PowerShell on Windows and MacOS as primary shell and has a PowerShell profile customized over years and develops PS projects on both OS', I am happy to provide feedback :)

noahzweben commented 5 months ago

Hi all! We've made progress on our Warp on Windows build and have a 5 question follow-up survey about Windows and Powershell functionality to inform our roadmap here!

Thank you for your support!

B4RN154N commented 4 months ago

I would LOVE Nushell support as I'm leaving Zsh/PowerShell in favor of Nushell to consolidate scripts/workflows over OS-es. Please make that happen šŸ™šŸ»

Gonkers commented 3 months ago

Hey all! We're experimenting with Warp on Windows. As part of the effort, we're looking into Powershell. Here's a demo of a Powershell session running on my Mac:

This is only experimental at the moment, as there's still a lot to do to make sure it works with Warp's other features.

I can't wait to get my hands on this! Thanks for working towards pwsh support. I fully admit I'm one of those weirdos using Powershell on MacOS.