diff options
author | Toby Vincent <tobyv13@gmail.com> | 2022-05-25 16:13:14 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2022-05-25 16:13:14 -0500 |
commit | 23979518a152f68469f29f5f5dc4f7919d7c8156 (patch) | |
tree | 0b7922f5920350c9d79913954dfc4ea95e4c66a9 /tmux/.local/bin/tmux-windowizer | |
parent | 0d140f9fefb930aae2a31557fc1e5d85ab55c997 (diff) |
feat(tmux): improve tmux scripts
Diffstat (limited to 'tmux/.local/bin/tmux-windowizer')
-rwxr-xr-x | tmux/.local/bin/tmux-windowizer | 10 |
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" "$* " |