summaryrefslogtreecommitdiff
path: root/dot-bashrc
diff options
context:
space:
mode:
authorJosé Juan Loeza Sierra <jj@xz6ze.com>2026-04-08 20:05:21 -0700
committerJosé Juan Loeza Sierra <jj@xz6ze.com>2026-04-08 20:05:21 -0700
commitaa8a5f2fcd529bd5edb4337f1b2584d09a460349 (patch)
treef98b44dfaba05701f7b5c344efee06e07b0c3d7a /dot-bashrc
parent1543fa7e63654042b577affc644bd170bc8858be (diff)
change container PS1 check with that from distrobox
This is the check distrobox uses for seeing if we're in a container. See https://github.com/89luca89/distrobox/blob/324f6fedac818dd71eefbde3ee34d709477c9064/distrobox-init#L2252
Diffstat (limited to 'dot-bashrc')
-rw-r--r--dot-bashrc4
1 files changed, 2 insertions, 2 deletions
diff --git a/dot-bashrc b/dot-bashrc
index 43ed001..e6792c4 100644
--- a/dot-bashrc
+++ b/dot-bashrc
@@ -92,8 +92,8 @@ eval "$(direnv hook bash)"
# zoxide
eval "$(zoxide init bash)"
-# add container id to prompt when in a container
-if [[ -n "$CONTAINER_ID" ]]; then
+# add container id to prompt when in a toolbox/distrobox container
+if [ -f /run/.toolboxenv ]; then
PS1="($CONTAINER_ID) $PS1"
fi