From 4ca023bc75ba1155899d06755653662a99ebb039 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sat, 10 Dec 2022 13:29:39 -0800 Subject: [PATCH] "cd /data/openpilot" only for main tmux session (#99) --- userspace/home/.bash_profile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/userspace/home/.bash_profile b/userspace/home/.bash_profile index 0db386b..f0d9b1b 100644 --- a/userspace/home/.bash_profile +++ b/userspace/home/.bash_profile @@ -4,5 +4,6 @@ export MYVIMRC="~/.vimrc" source $HOME/.profile -# TODO: there's probably a better way to do this for only the main tmux session -[ -d "/data/openpilot" ] && cd /data/openpilot +if [ -d "/data/openpilot" ] && [ "$(tmux display-message -p '#{session_name}')" == "comma" ] ; then + cd /data/openpilot +fi