Giter Site home page Giter Site logo

Comments (10)

ocean90 avatar ocean90 commented on May 25, 2024
deploy@compute-01 ~ % cat .zshrc
# Set up the prompt

autoload -Uz promptinit
promptinit
prompt adam1

Checked some of the other themes, none of them are using \H for the host, which is the placeholder for the fully qualified domain name (or FQDN).

deploy@compute-01 ~ % hostname
compute-01
deploy@compute-01 ~ % hostname -f
compute-01.ch.example.ch

from appside.

ivomarino avatar ivomarino commented on May 25, 2024

we should define a file in etc with some vars to source

from appside.

ivomarino avatar ivomarino commented on May 25, 2024

code for this is here https://github.com/ttssdev/appflow/blob/master/playbooks/roles/common/tasks/main.yml#L87-L91, currently disabled.

from appside.

ocean90 avatar ocean90 commented on May 25, 2024

Quote from GitLab.com Database Incident:

TODO after data restored:

  • Create issue to change terminal PS1 format/colours to make it clear whether you’re using production or staging (red production, yellow staging)
  • Show the full hostname in the bash prompt for all users by default (e.g., “db1.staging.gitlab.com” instead of just “db1”)

from appside.

ivomarino avatar ivomarino commented on May 25, 2024

one idea is to leave hostname like it is:

user@compute-01

but change the color:

  • green: development
  • blue: testing
  • yellow: staging
  • red: production

@ocean90 what do you think?

from appside.

ocean90 avatar ocean90 commented on May 25, 2024

Would user@compute-01 [staging] (plus color) work too?

from appside.

ivomarino avatar ivomarino commented on May 25, 2024

@ocean90 could be an option, basic idea is to keep the prompt as short as possible so maybe:

user@compute-01 [dev]
user@compute-01 [test]
user@compute-01 [stage]
user@compute-01 [prod]

I would suggest to start by grades, so first color, if we see it's not sufficient let's add also the suffix, ok?

from appside.

ocean90 avatar ocean90 commented on May 25, 2024

Isn't it possible to disable or change colors? That's what I see in iTerm:

bildschirmfoto 2017-02-02 um 12 21 31

Colors are probably fine for the start but I always prefer text as it's more accessible. Don't forget that there are people with red–green color blindness. :)

from appside.

ivomarino avatar ivomarino commented on May 25, 2024

True, also: http://serverfault.com/a/323155 ;)

from appside.

ivomarino avatar ivomarino commented on May 25, 2024

For now I won't implement this, if someone would like to take it over feel free to open a pull request.

from appside.

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.