Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mandel-macaque opened this issue Apr 4, 2022 · 47 comments
Labels
Feature requests Feature Requests

Comments

@mandel-macaque
Copy link

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
Copy link

pkutaj commented Apr 6, 2022

+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
Copy link

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 elviskahoro changed the title Warp does not understand other shells Warp does not understand other shells like powershell May 10, 2022
@warpdotdev warpdotdev deleted a comment from warpdotdev-devx May 10, 2022
@elviskahoro
Copy link
Member

Gonna keep this open here actually.

@bmitc
Copy link

bmitc commented May 19, 2022

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
Copy link

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
Copy link
Member

warpdotdev-devx commented May 30, 2022 via email

@bbusschots-mu
Copy link

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

@gisantiago
Copy link

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

@dannyneira dannyneira changed the title Warp does not understand other shells like powershell Warp does not understand other shells like powershell / nushell Nov 28, 2022
@dannyneira dannyneira changed the title Warp does not understand other shells like powershell / nushell Warp does not understand other shells like powershell / nushell / ksh Nov 28, 2022
@dannyneira
Copy link
Member

Adding XONsh to the list

@Xjs
Copy link

Xjs commented Jan 5, 2023

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

@warpdotdev-devx warpdotdev-devx bot added the Feature requests Feature Requests label Jan 9, 2023
@thomrad
Copy link

thomrad commented Feb 16, 2023

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

@dannyneira dannyneira changed the title Warp does not understand other shells like powershell / nushell / ksh Warp does not understand other shells like powershell / nushell / ksh / xonsh Mar 17, 2023
@dannyneira dannyneira changed the title Warp does not understand other shells like powershell / nushell / ksh / xonsh Support other shells like powershell / nushell / ksh / xonsh / elvish Mar 17, 2023
@f1rstC0de
Copy link

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

@dannyneira dannyneira changed the title Support other shells like powershell / nushell / ksh / xonsh / elvish Support other shells like powershell / nushell / ksh / xonsh / elvish / tcsh Apr 24, 2023
@dannyneira
Copy link
Member

added tcsh to the list based on user feedback

@Manbearpiet
Copy link

pwsh would be lovely indeed!

@standard-librarian
Copy link

can't wait for nushell. guys, i love warp ❤️.

@AucaCoyan
Copy link

I'd love nushell support too! ❤️

@susl
Copy link

susl commented Dec 10, 2023

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

@raaaaaymond
Copy link

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
Copy link

texastoland commented Dec 27, 2023

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

Footnotes

  1. Not indicative of legacy usage 2

@dannyneira
Copy link
Member

@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
Copy link

texastoland commented Dec 28, 2023

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
Copy link
Member

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

@texastoland
Copy link

Wiiild thanks so much for sharing 🙌🏼

@UserSv4
Copy link

UserSv4 commented Jan 9, 2024

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

@damianpowell
Copy link

+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
Copy link

texastoland commented Feb 22, 2024

@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
Copy link
Member

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
Copy link

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
Copy link

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
Copy link

itpropro commented Mar 9, 2024

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
Copy link

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
Copy link

+1 for nushell

@atl-ggregson
Copy link

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
Copy link

Any ETA about Nushell support?

@acarl005
Copy link

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
Copy link

@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
Copy link

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
Copy link

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
Copy link

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
Copy link

glcraft commented Apr 17, 2024

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

@itpropro
Copy link

itpropro commented May 2, 2024

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature requests Feature Requests
Projects
None yet
Development

No branches or pull requests