Warp
                                
                                
                                
                                    Warp copied to clipboard
                            
                            
                            
                        Support subshells in Warp
Describe the bug
When I exec my shell, which I sometimes do to reload the environment, Warp thinks it's a long running command and loses the ability to understand blocks.
To Reproduce Steps to reproduce the behavior:
- Run 
exec <shell> 
Expected behavior Warp understands the shell was replaced by another shell, and still is able to do block I/O.
This applies to just running the shell without exec too. In that case, I wonder if Warp could somehow do "nested" blocks?
Screenshots

Desktop (please complete the following information):
- MacOS 11.3.1
 
Yeah i think the right UI for this is to continue doing blocks but with some indication that you are in a subshell, similar to how we handle ssh. This should be doable. Please upvote if you want it.
Differentiating User Shells And Subshells
From @shankarshastri via #220
Describe the solution you'd like?
It would be great based on the context, to show to users that currently in shell or subshell mode (For example docker shell container id for docker exec, and in case of ssh to ssh and hostname)
Is your feature request related to a problem? Please describe.
It's always a challenge to know whether we are in actual shell or any subshells.
Additional context
No response
Poetry (python) creates a subshell. Would be nice if this was supported as well.
Are there any plans or roadmaps for supporting the sub-shell feature?
Hi, in a ruby on rails console I have the same issue. Thanks for looking into it!
From #949
Describe the bug
On the MBP v12.2.1 native terminal, when I open up `psql`,I can navigate via Option + Left/Right arrow and modify my queries, but this behavior isn't compatible in Warp. Instead, I just get a space in the shell.
To Reproduce
Steps to reproduce:
- Open 
psql - Type out a query like 
select * from users - Try to navigate via Option + Left Arrow to replace 
*with specific columns. - See that the cursor is moved to the right for some reason 🤷.
 
Expected behaviour
I would expect to be moved to the next "word" in the direction of the arrow key I choose while holding Option.
Screenshots
No response
Operating System
MacOS
OS Version
12.2.1
Additional context
No response
Having Warp work with DB subshells would be huge. Those are the places where we often have to type and edit very long commands and basically where Warp would bring a lot of value.
Encountered the same issue in subshells:
- mongo shell
 - mycli command line
 - ...
 
Currently, we can do the same things by
Esc + Bto move cursor to the beginning of the current wordEsc + Fto move cursor to the end of the current wordCtrl + Wto delete whole word
But, it's not convenient and friendly. Looking forward to the shortcuts support in subshells by OPTION/CMD + ARROW LEFT/RIGHT or BACKSPACE
Just to add to the list of programs that would benefit from this, AWS's Elastic Beanstalk CLI. Specifically the eb ssh command
Not sure if this is the same issue, but in micro some shortcuts also don't work. Notably Opt+Backspace to delete whole previous word, which only deletes one character. The shortcut works as expected in iTerm2 but not in Mac Terminal.
Opt+Left Arrow works in all three environments inside micro.
I think I have another use case surfacing this issue. When using psql, the pager appears broken.
Eg in psql, when running a SELECT query, or doing something like \d <table name>, I  very briefly see the results of the query, but then Warp scrolls downward at very quick speed (warp speed?) and all I get is a buffer full of
~
~
~
(END)
I can't scroll back up to see content.
If I first disable the pager in psql, eg \pset pager 0 then I don't get this behavior.
Also, if I run this in another terminal program (eg the stock mac terminal program), I also don't get this behavior, so this does appear to be something specific to Warp and not my postgres installation.
+1
Not only that, but it's tremendously slow when navigating through text after doing exec <shell> and trying to edit a long command.
There are plans but no ETA!
- elvis
 
Whenever developing (80% of my terminal use), I have to stop using Warp. Please share some update about the progress. A public alpha build so we can help test and give feedback. Can we see some slow but steady progress on this.
I just heard about Warp today and started using it, but this is a pretty major setback. Definitely will try to use it as much as I can because the features are amazing, but I'd love to be able to use it 100% of the time rather than 15% of the time.
I switch between shells a bit, so support for this would be great. Example is I use fish as my default shell, but at times need to switch to zsh/bash/powershell.
I switch between shells a bit, so support for this would be great. Example is I use fish as my default shell, but at times need to switch to zsh/bash/powershell.
I don't think this is the same thing as that being requested in this thread. You are talking about different shell programs. The issue is for different virtual environments executed via sub-shells (but using the same shell program).
@kchawla-pi Still no ETA on this feature. It's definitely something that's non-trivial.
@donwlewis -> @kchawla-pi is correct here. There are plans to create a generic shell if there are other shells you'd like to see supported outside of Bash, Zsh, Fish. Here's the link to that discussion: https://github.com/warpdotdev/Warp/discussions/64
@elviskahoro Maybe I am misunderstanding, but I think this still qualifies because in my scenario, I am executing zsh/bash as a sub-shell within fish. Please correct me if I am wrong.
OH I see. Thanks for clarifying! This is the right issue to keep an eye on. I'll let you know if we end up making smaller more specific sub-issues.
Just plain sudo su - is also causing this.
+1
As @taypo pointed out, this issue also impacts sudo, or su. Sometimes I just need to sudo into zsh or bash to do many tasks as root, rather than prefacing a thousand things with sudo, but, once I do invoke "sudo zsh" or "sudo bash", warp treats everything from that point on as one block. Defeats some of the point, and magic, of using Warp!
I got here from issue #807, so I'll just echo that request, to be able to use CMD or OPTION + arrow keys when in REPLs like pry, irb, etc. Blocks in subshells would be awesome! Thanks!
This is also a problem with nix shell, where I install a new program only in a Childs zsh process, so the path inside of that is changed, therefor a new zsh has to be created.
Comment from #2217
Pretty enjoy the IDE-style editor, especially the ability of selecting the text to delete it. So I'm wondering is it possible to support this feature in REPLs, e.g., python, psql, ... 🤔
+1 without this feature, warp become useless in 90% of work
As mentioned by others before sub shell support is desperately needed. I use containers running on my mac that provide me various tools with a fixed version and included dependencies for my daily work. Sadly Warp loses all its glory as soon as I enter a container shell (docker exec -it toolbox bash).
+1 to increase the priority of this feature.
By the way I'm a big fan and I would love to use warp as my go-to terminal.
+1 this is probably the most important feature that Warp is missing