From 8ff527999fb31c8d7cf25763b653a0f9294f40b0 Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Sat, 24 Sep 2022 20:14:19 -0500 Subject: [PATCH] Vim quick push --- zshmux.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zshmux.zsh b/zshmux.zsh index 59bc47a..3e9d9cf 100644 --- a/zshmux.zsh +++ b/zshmux.zsh @@ -8,12 +8,12 @@ if [[ -z $TMUX ]]; then printf '\n\033[34;1mNo \033[33;1mtmux \033[34;1msessions active\n' fi printf '\033[34;1mAttach session?\033[0;m: [\033[35;1mname\033[0m] \033[37;2m(empty if none)\033[0m: ' - read response - if [ -n "$response" ]; then - if tmux list-sessions | grep -q "$response"; then - tmux attach-session -t $response + read sesh + if [ -n "$sesh" ]; then + if tmux list-sessions | grep -q "$sesh"; then + tmux attach-session -t $sesh else - tmux new-session -s $response + tmux new-session -s $sesh fi fi fi -- 2.44.2