From 0bdb34bff5e971aef842bc7c90de66a5f9eb323c Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Sat, 24 Sep 2022 20:03:27 -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 137333d..68b14d3 100644 --- a/zshmux.zsh +++ b/zshmux.zsh @@ -1,16 +1,16 @@ #!/bin/zsh if [[ -z $TMUX ]]; then - if tlist &> /dev/null ; then - printf 'Current tmux sessions:\n\n' - tlist + if tmux list-sessions &> /dev/null ; then + printf 'Current tmux sessions:\n' + tmux list-sessions -F"#S - (#{?session_attached,Attached,Not Attached})" else printf '\nNo tmux sessions active\n' fi - printf '\n\tAttach session?: [name] (empty if none): ' + printf 'Attach session?: [name] (empty if none): ' read response if [ -n "$response" ]; then - if tlist | grep -q "$response"; then + if tmux list-sessions | grep -q "$response"; then tmux attach-session -t $response else tmux new-session -s $response -- 2.44.2