aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/tmux.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-10-10 16:26:05 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-10-10 16:26:05 +1300
commit5dcdb98fc706cf0c306bbfed32c9fccf54e4f0eb (patch)
tree50dc252bc9a874595fdb61d7e452ca73a9b09184 /bash/bashrc.d/tmux.bash
parentMove array decs inline, remove quotes (diff)
downloaddotfiles-5dcdb98fc706cf0c306bbfed32c9fccf54e4f0eb.tar.gz
dotfiles-5dcdb98fc706cf0c306bbfed32c9fccf54e4f0eb.zip
Remove overengineered tmux args array
Diffstat (limited to 'bash/bashrc.d/tmux.bash')
-rw-r--r--bash/bashrc.d/tmux.bash10
1 files changed, 3 insertions, 7 deletions
diff --git a/bash/bashrc.d/tmux.bash b/bash/bashrc.d/tmux.bash
index 1d192f46..1718b103 100644
--- a/bash/bashrc.d/tmux.bash
+++ b/bash/bashrc.d/tmux.bash
@@ -5,22 +5,18 @@ fi
# Attach to existing tmux session rather than create a new one if possible
tmux() {
- local -a tcmd
# If given any arguments, just use them as they are
if (($#)) ; then
- tcmd=("$@")
+ command tmux "$@"
# If a session exists, just attach to it
elif command tmux has-session 2>/dev/null ; then
- tcmd=(attach-session -d)
+ command tmux attach-session -d
# Create a new session with an appropriate name
else
- tcmd=(new-session -s "${TMUX_SESSION:-default}")
+ command tmux new-session -s "${TMUX_SESSION:-default}"
fi
-
- # Run tmux command with concluded arguments
- command tmux "${tcmd[@]}"
}