-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Make it more obvious in the terminal when launching the subshell via atmos terraform shell
#495
Comments
Yes, I could see that the PS1 maybe should be overridden to something plain like |
May I work on this issue @osterman ? |
Possibly, could you suggest your approach? |
I thought of introducing the PS1 environment variable in the componentEnvList at internal/exec/shell_utils.go#L163. I tried this on the forked setup locally but the PS1 value is not getting override :( . So for now, I don't have any alternate approach. |
Good news, bad news. @rajhawaldar @nitrocode Bad NewsBad news is, I think little can be done here, since we're just invoking a "login" ( Alternatively, we could make Good NewsThe line @rajhawaldar shows that it already passes the component's deep merged environment. The prompt is controlled by Just set the following in the Stack configuration and it should work.
Then in your local rc file, check for that variable and set the prompt to it. It's not the ideal solution, and there's nothing about calling an interactive. If @rajhawaldar wants to add the |
@osterman @rajhawaldar maybe something slightly higher-level, like finding some common way to edit PS1 through shell tools that many humans use, like starship.rs or oh-my-zsh etc. |
@osterman Apologies for the late response. Do we really need to introduce the new shell parameter to the I performed following steps on my local setup, and it does the job.
Then I just got the desired prompt as below, @osterman, let me know your thoughts on this approach. |
I think we can do that. I think we should implement that, and add PS1 unless it explicitly set in the atmos config. |
This is addressed in #761 |
Describe the Feature
Sometimes we're in the subshell and forget that the subshell is specific to a stack and then try to plan/apply a different stack which leads to errors.
If the PS1 or something can be modified to show that atmos is in the
atmos terraform shell
mode, it would be very helpful.Expected Behavior
For example, if you're in the shell stack
ue1-eks
, then atmos should throw a warning if you're trying to runatmos
within the shell against another stack.Use Case
Forgetting that you're in a subshell
Describe Ideal Solution
Maybe a warning or a PS1 change to show you're in a subshell
Alternatives Considered
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: