From 80f92a7109c0bce2f4220ff1ce04ec8fd6fb9f8c Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Fri, 8 Oct 2021 17:22:47 -0700 Subject: fix(tmux): regex to correctly deal with suspended nvim --- bin/tmux-send | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/tmux-send b/bin/tmux-send index 47a6de8..a1911f3 100755 --- a/bin/tmux-send +++ b/bin/tmux-send @@ -2,7 +2,7 @@ dir=$1 tty=$(tmux list-panes -F "#{pane_active}#{pane_tty}" | grep '^1' | cut -c2-) -vim=$(ps -o stat=,command= -t $tty | awk 'BEGIN{flag=0} {if($1 ~ /S*+/ && $2 ~ /nvim/){flag +=1}}; END {print flag}') +vim=$(ps -o stat=,command= -t $tty | awk 'BEGIN{flag=0} {if($1 ~ /S[a-z]*+/ && $2 ~ /nvim/){flag +=1}}; END {print flag}') if [ $vim -gt 0 ]; then case $dir in -- cgit v1.2.1