aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tmux/.local/bin/tmux-windowizer
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-05-25 16:13:14 -0500
committerToby Vincent <tobyv13@gmail.com>2022-05-25 16:13:14 -0500
commit23979518a152f68469f29f5f5dc4f7919d7c8156 (patch)
tree0b7922f5920350c9d79913954dfc4ea95e4c66a9 /tmux/.local/bin/tmux-windowizer
parent0d140f9fefb930aae2a31557fc1e5d85ab55c997 (diff)
feat(tmux): improve tmux scripts
Diffstat (limited to 'tmux/.local/bin/tmux-windowizer')
-rwxr-xr-xtmux/.local/bin/tmux-windowizer10
1 files changed, 5 insertions, 5 deletions
diff --git a/tmux/.local/bin/tmux-windowizer b/tmux/.local/bin/tmux-windowizer
index 6cee8b0..81509ae 100755
--- a/tmux/.local/bin/tmux-windowizer
+++ b/tmux/.local/bin/tmux-windowizer
@@ -1,14 +1,14 @@
#!/usr/bin/env bash
-branch_name=$(basename $1)
+branch_name=$(basename "$1")
session_name=$(tmux display-message -p "#S")
-clean_name=$(echo $branch_name | tr "./" "__")
+clean_name=$(echo "$branch_name" | tr "./" "__")
target="$session_name:$clean_name"
-if ! tmux has-session -t $target 2>/dev/null; then
- tmux neww -dn $clean_name
+if ! tmux has-session -t "$target" 2>/dev/null; then
+ tmux neww -dn "$clean_name"
fi
shift
-tmux send-keys -t $target "$*
+tmux send-keys -t "$target" "$*
"