-
Notifications
You must be signed in to change notification settings - Fork 220
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
profile.d: prepend purple hexagon to PS1 rather than overwriting it #1517
base: main
Are you sure you want to change the base?
Conversation
This also avoids the need to have separate definitions for bash and zsh More importantly it means the traditional Red Hat style bash prompt is not forced onto all other OS toolboxes too. containers#1517 Signed-off-by: Jens Petersen <[email protected]>
More importantly it means the traditional Red Hat style prompt is not forced onto all other OS toolboxes too. A space is added after the hexagon since vte tends to render it too big at least with google-noto-color-emoji-fonts. containers#1517 Signed-off-by: Jens Petersen <[email protected]>
Importantly this means the traditional Red Hat style prompt is not forced onto all other OS toolboxes too. A space is added after the hexagon since vte tends to render it too big at least with google-noto-color-emoji-fonts. containers#1517 Signed-off-by: Jens Petersen <[email protected]>
I tested this locally in a VM and it works for me both with bash and zsh in fedora-toolbox:41 |
Build succeeded. ✔️ unit-test SUCCESS in 6m 34s |
This doesn't work if one overrides the PS1 in a user file (e.g. bashrc), as those are sourced after the ones in /etc/profile.d and would wipe the PS1 change introduced here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, @juhp !
I didn't mean to ignore this. I have been trying to get a new dot-zero release out, and keep hitting various obstacles, and I am always paranoid about anything that touches the shell start-up scripts because every operating system does things so differently.
It will be good to try it out on host and container combinations of the operating systems that we claim to support. ie., Arch, Fedora, RHEL and Ubuntu. I know, the matrix isn't small. :)
What do you think of the PROMPT_COMMAND
idea, and perhaps falling back to the current approach if PROMPT_COMMAND is not an array?
The current approach with the hexagon doesn't work on some host/container combinations. eg., Arch and Ubuntu, but I forgot the details. I wonder if this improves that situation or something can be done to improve it.
@glemco that is already the case today and I might even call it a feature: users should be able to override toolbox PS1 if they want, and it is particularly necessary currently since the current toolbox prompt is rather restrictive and insufficient (the biggest problem being that it is does not distinguish different toolboxes clearly). |
I would love to see a 0.1 release finally :-)
I feel a better approach might be to put out snapshots and test them in Rawhide, etc (early in the development cycle) for broader testing: it is not really practical for an individual to test all possible host × container matrices realistically.
I reopened #1514 which was actually the original motivation or wart I wanted to fix, since currently the binary PS1 makes it harder than necessary to override PS1 for users or I need to think more about PROMPT_COMMAND in this context.
I see, maybe there should be an issue to track that? |
Importantly this means the traditional Red Hat style prompt is not forced onto all other OS toolboxes as well.