summaryrefslogtreecommitdiff
path: root/dot-bashrc
diff options
context:
space:
mode:
authorJosé Juan Loeza Sierra <jj@jlsd9.com>2026-04-08 20:05:21 -0700
committerJosé Juan Loeza Sierra <jj@jlsd9.com>2026-04-08 20:05:21 -0700
commit30f489ba7865ee0641964cda2bc4f8433b58c2ba (patch)
treef98b44dfaba05701f7b5c344efee06e07b0c3d7a /dot-bashrc
parent3310c35fa0d4b24ec136b41f1dd524204b2ec40d (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