-
Notifications
You must be signed in to change notification settings - Fork 376
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 shell-based subshells in Warp #64
Comments
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. |
exec ...
is a long running command
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 contextNo 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
To ReproduceSteps to reproduce:
Expected behaviour
ScreenshotsNo response Operating SystemMacOS OS Version12.2.1 Additional contextNo 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:
Currently, we can do the same things by
But, it's not convenient and friendly. Looking forward to the shortcuts support in subshells by |
Just to add to the list of programs that would benefit from this, AWS's Elastic Beanstalk CLI. Specifically the |
Aw man, this is disappointing. I just discovered Warp, got excited, and now find out that it doesn't support nushell. The rusty terminal should work with the rusty shell! As cool as Warp is I can't give up nushell so it's back to iterm for now. |
Good work guys! Warp is the best thing happened to UNIX command line since zsh. Another command not yet mentioned is I am working on a server and often I need to use |
The new subshell capability is hands down the best feature! A few things I have noticed:
Happy to open separate issues if that's preferred! None of these are blocking, of course. |
Hi all, some exciting news: Support for "Warpifying" bash, zsh, and fish subshells is launched in the latest release (v0.2023.05.18.01.08.stable_04)! In Warpified subshell sessions, Warp's features like blocks, input editor, completions, etc work the same way they do in 'top-level' shell sessions. By default, Warp recognizes the following commands and displays a banner prompting you for Warpification:
For the sake of clarity - Warpifying non-shell REPLs like |
@llam15 Thanks for the feedback!
Mind filing a separate GH issue for this? We should be able to prioritize a fix for this shortly. Additionally, just to be clear, is |
Wow, that's great news!!! Will it work with |
@Slawikus Initiating We'll update our docs and this thread if/when any others are added to the supported list. https://docs.warp.dev/features/subshells#how-to-warpify-the-subshell |
It seems like subshells spawned by |
@Evian-Zhang thanks for the feedback -- For commands that are not automatically recognized for Warpification (including On subsequent executions, the Warpify banner will be shown and you'll be able to Warpify the session. Feel free to follow up on the thread if you encounter any issues! |
I'm getting the following error when clicking on Warpify after adding sudo su to the commands: sh-3.2# [ -z $WARP_BOOTSTRAPPED ] && echo $0 | grep -q zsh && unsetopt ZLE && eval 'unsetopt ZLE;WARP_SESSION_ID="$(date +%s)$RANDOM";_hostname=$(command -v hostname >/dev/null 2>&1 && command hostname 2>/dev/null || uname -n);_user=$(command -v whoami >/dev/null 2>&1 && command whoami 2>/dev/null || echo $USER);_msg=$(printf "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"shell\": \"zsh\", \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"is_subshell\": true}}" | od -An -v -tx1 | command tr -d " \n");printf '"'"'\x1b\x50\x24\x64%s\x9c'"'"' $_msg;unset _hostname _user _msg;' || [ -z $WARP_BOOTSTRAPPED ] && echo $0 | grep -q bash && eval 'stty raw;unset PROMPT_COMMAND;HISTCONTROL=ignorespace;HISTIGNORE=" *";WARP_SESSION_ID="$(date +%s)$RANDOM";_hostname=$(command -v hostname >/dev/null 2>&1 && command hostname 2>/dev/null || uname -n);_user=$(command -v whoami >/dev/null 2>&1 && command whoami 2>/dev/null || echo $USER);_msg=$(printf "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"shell\": \"bash\", \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"is_subshell\": true}}" | od -An -v -tx1 | command tr -d " \n");printf '"'"'\x1b\x50\x24\x64%s\x9c'"'"' $_msg;unset _hostname _user _msg;' || [ -z $WARP_BOOTSTRAPPED ] && [ $FISH_VERSION ] && eval 'set -g WARP_SESSION_ID (random);set _hostname $(command -v hostname >/dev/null 2>&1 && command hostname 2>/dev/null || uname -n);set _user $(command -v whoami >/dev/null 2>&1 && command whoami 2>/dev/null || echo $USER);set _msg $(echo -n "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"shell\": \"fish\", \"is_subshell\": true}}" | od -An -v -tx1 | command tr -d " \n");echo -n \u1b\u50\u24"d$_msg"\u9c;set -e _hostname _user _msg;' |
Hey @sebdanielsson, It looks like this is because the login shell for the root user in your machine is That being said, we can probably do a better job of messaging that only bash/fish/zsh are supported. Or possibly look at ways to detect an unsupported shell while Warpifying and then notify you if so. |
Thank you for this fantastic feature! Looking forward to an option in settings to automatically warpify all supported (whitelisted) shells. Updating RC files is fine for local shells but when you work with docker or ssh subshells a lot it's not very feasible. |
Hey @shumkov, Makes sense that the RC file update isn't always practical with docker containers/remote hosts. Automatic Warpification without an RC file is tough because, under the hood, Warpification is done by executing an initialization command that performs all the necessary setup for blocks, input editor, completions etc to work. Basically, without the RC file update, Warp would have to know if and when it's ok to Warpify purely based on the executed subshell command. This is hard to do in a reliable way because the executed command doesn't always encode the shell (bash vs fish vs tcsh vs nushell) that is being spawned, and some of these shells are unsupported -- so it would put the subshell in a bad state if we just automatically tried to Warpify by executing the initialization command (which might contain invalid syntax or make assumptions that don't hold true in unsupported shells). There might be some non-RC file-based workaround here, but it would still likely involve installation of some small binary or creation of some config file on the remote hosts where the subshells are being spawned, both of which I'm thinking are as intrusive (or more intrusive) than updating an RC file. I could be wrong here, though! Also open to other suggestions, since it's obvious that automatic Warpification for all subshells would be the most ideal UX. |
Now that feature has landed is it more feasible to add first class support for nushell? Is that on the roadmap? Warp looks awesome but I can't leave nushell for an old style shell, it's just too good. Nushell combined with Warp would be the most amazing experience! |
@zachbai thank you for the comprehensive explanation. I understand the complications and I hope you guys will find a solution! |
It is interesting that, I can't directly ssh into a FreeBSD machine with warpified shell (I use I just feel confused that what is the different between a subshell and a shell spawned by ssh. Why don't use the same technologies to enable Warp features across ssh-target and subshells spawned by other common commands? |
Sorry for the late reply, I did not get a notification for your reply 😓
Yes you're correct, |
Locking this issue to help with notifications. We are aware of the demand for non-shell based subshells (REPLs). Any further updates will be posted on this thread by the Warp team. |
Hey folks, since this issue was originally for sh based subshell, we're closing as resolved. We'll be tracking the REPLs non-shell based subshell in a new meta issue which will also contain comments for tracking each REPL (irb, ipython, pipenv, psql, node, mongosh, rails, nix-shell, etc.) here #4082 Closing as completed since Subshell support has been |
We're tracking non-shell based REPLs (like
irb
,ipython
,psql
, etc. ) on another GitHub issue > #4082** List of shell-based subshells Warp supports **
The text was updated successfully, but these errors were encountered: