diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-12-21 22:20:18 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-12-21 22:20:18 +1300 |
commit | 61a3fe778aafa96aca859e844c2aa567285d5f55 (patch) | |
tree | c53c7a298726ba8fa71bb6077ac1d6b9afd7ae89 /bash/bashrc.d | |
parent | Add another pattern to nobatch (diff) | |
download | dotfiles-61a3fe778aafa96aca859e844c2aa567285d5f55.tar.gz dotfiles-61a3fe778aafa96aca859e844c2aa567285d5f55.zip |
Change null-arguments check for tmux func
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r-- | bash/bashrc.d/tmux.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/tmux.bash b/bash/bashrc.d/tmux.bash index e7aaa826..2e4db7a6 100644 --- a/bash/bashrc.d/tmux.bash +++ b/bash/bashrc.d/tmux.bash @@ -7,8 +7,8 @@ fi tmux() { # If sessions exist, default the arguments to the attach-session command - if command tmux has-session 2>/dev/null; then - command tmux "${@:-attach-session}" + if ! (($#)) && command tmux has-session 2>/dev/null; then + command tmux attach-session # Otherwise, just call tmux directly with the given arguments else |