Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open new window in tmux #114

Open
abl0719 opened this issue Jul 15, 2018 · 0 comments
Open

Open new window in tmux #114

abl0719 opened this issue Jul 15, 2018 · 0 comments
Labels

Comments

@abl0719
Copy link

abl0719 commented Jul 15, 2018

Hi,

I set use_tmux=1 and added the following code in .bashrc. However, when I re-open wsl-terminal, it always opens a new window instead of attaching to the existing one. It seems that the $ATTACH_ONLY is always null in the session, thus, tmux new-window -c "$PWD" 2>/dev/null && exec tmux a is always called even if there is a exising window.

[[ -z "$TMUX" && -n "$USE_TMUX" ]] && {
    [[ -n "$ATTACH_ONLY" ]] && {
        tmux a 2>/dev/null || {
            cd && exec tmux
        }
        exit
    }
    tmux new-window -c "$PWD" 2>/dev/null && exec tmux a
    exec tmux
}
shiro pushed a commit to shiro/wsl-terminal that referenced this issue Oct 9, 2019
Add scoop install instructions to readme.md (mskyaxl#30)
@mskyaxl mskyaxl added the tmux label Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants