Closed ocean90 closed 5 years ago
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
we should define a file in etc
with some vars to source
code for this is here https://github.com/ttssdev/appflow/blob/master/playbooks/roles/common/tasks/main.yml#L87-L91, currently disabled.
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”)
one idea is to leave hostname like it is:
user@compute-01
but change the color:
@ocean90 what do you think?
Would user@compute-01 [staging]
(plus color) work too?
@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?
Isn't it possible to disable or change colors? That's what I see in iTerm:
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. :)
True, also: http://serverfault.com/a/323155 ;)
For now I won't implement this, if someone would like to take it over feel free to open a pull request.