Git Product home page Git Product logo

Comments (7)

osterman avatar osterman commented on August 24, 2024 1

Yes, I could see that the PS1 maybe should be overridden to something plain like (atmos) ue1-eks > so it's clear you're in the shell and for which particular stack. We could then maybe disable this behavior by passing --override-ps1=false

from atmos.

rajhawaldar avatar rajhawaldar commented on August 24, 2024

May I work on this issue @osterman ?

from atmos.

osterman avatar osterman commented on August 24, 2024

Possibly, could you suggest your approach?

from atmos.

rajhawaldar avatar rajhawaldar commented on August 24, 2024

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.

from atmos.

osterman avatar osterman commented on August 24, 2024

Good news, bad news. @rajhawaldar @nitrocode

Bad News

Bad news is, I think little can be done here, since we're just invoking a "login" (-l) shell based on SHELL. The login shell will always overwrite the environment. There's no general solution that will work, other than the developer modifying their own .zshrc or .bashrc file with a custom prompt.

Alternatively, we could make shell a parameter in the atmos.yaml, and if set, use that over the SHELL env. In that case, the default shell can be changed to not include -l, which then will not load the RC files.

Good News

The line @rajhawaldar shows that it already passes the component's deep merged environment. The prompt is controlled by PS1 (for bash).

Just set the following in the Stack configuration and it should work.

env:
  ATMOS_PS1: "atmos>"
  # This works, but gets overridden by the shell's rc file.
  # PS1: "atmos>"

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 shell parameter to the atmos.yaml, and it solves the PS1, that would be appreciated.

from atmos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.