Open
Description
This is more an enhancement than an issue.
When using Distrobox, our home folder is mounted within a container (podman or docker). Using the command distrobox enter <container_name>
we can't see any difference from shell prompt and it's hard to know if we are on the host or inside the container.
My proposal is to have the hostname and a flag indicating if we are in the container. This can be made with this hack in the ~/.zshrc
:
if [[ -e /.dockerenv ]] ; then
psvar[1]="@${(%):-%m} «Docker»" # show hostname inside docker containers
elif [[ -e /run/.containerenv ]] ; then
psvar[1]="@${(%):-%m} «Podman»" # show hostname inside podman containers
fi
However, it will be better if this was merged in the source code. Additionally, would be nice to have a way to overwrite the colour of "Docker" and "Podman" words. Suggestion: AGKOZAK_COLORS_CONTAINERENV
.
Metadata
Metadata
Assignees
Labels
No labels