diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-12-18 20:12:06 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-12-18 20:12:25 +0300 |
commit | 1a0ed0c5af38ef8a50edfeae902aef3bb9c8251c (patch) | |
tree | 1c9dec87e798320e1d492157a53e862b30ee23cf | |
parent | tmux: cleaner status bar (diff) | |
download | linux-home-1a0ed0c5af38ef8a50edfeae902aef3bb9c8251c.tar.gz linux-home-1a0ed0c5af38ef8a50edfeae902aef3bb9c8251c.zip |
tmux: don't autostart on Cygwin
-rw-r--r-- | %HOME%/.bashrc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index 7347df6..701ee1d 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -132,8 +132,23 @@ nnn() { n "$@" } +remote_terminal() { + test -n "$SSH_CLIENT" -o -n "$SSH_TTY" +} + +local_terminal() { + ! remote_terminal +} + +multiplexed() { + test -n "$STY" -o -n "$TMUX" +} + # tmux: start automatically. # https://unix.stackexchange.com/a/113768 -if command -v tmux &> /dev/null && [ -z "$STY" ] && [ -z "$TMUX" ]; then +if os_is_cygwin && local_terminal; then + # Skip, as it's too slow for some reason. + true +elif ! multiplexed && command -v tmux &> /dev/null; then exec tmux fi |