aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-12-21 22:20:18 +1300
committerTom Ryder <tom@sanctum.geek.nz>2013-12-21 22:20:18 +1300
commit61a3fe778aafa96aca859e844c2aa567285d5f55 (patch)
treec53c7a298726ba8fa71bb6077ac1d6b9afd7ae89 /bash/bashrc.d
parentAdd another pattern to nobatch (diff)
downloaddotfiles-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.bash4
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