diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-12-18 06:33:48 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-12-18 06:33:48 +0300 |
commit | c9acb4e5e2a2a8189deb2c9b01c48a5ab3528817 (patch) | |
tree | 04ad0c43ffff31b68874bfe96f37f8285b91e786 | |
parent | .bashrc: remove an old TERM workaround (diff) | |
download | linux-home-c9acb4e5e2a2a8189deb2c9b01c48a5ab3528817.tar.gz linux-home-c9acb4e5e2a2a8189deb2c9b01c48a5ab3528817.zip |
.bashrc: better nested-tmux check
TERM might be set to e.g. "screen" via an SSH connection, but we still
want to attach to a tmux session in that case.
-rw-r--r-- | %HOME%/.bashrc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index 4a3fefc..a8f32ab 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -134,6 +134,6 @@ nnn() { # tmux: start automatically. # https://unix.stackexchange.com/a/113768 -if command -v tmux &> /dev/null && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then +if command -v tmux &> /dev/null && [ -z "$STY" ] && [ -z "$TMUX" ]; then exec tmux new-session -A -s main fi |