diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-10-08 17:22:47 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-10-08 17:22:47 -0700 |
commit | 80f92a7109c0bce2f4220ff1ce04ec8fd6fb9f8c (patch) | |
tree | 4d139ca22f7de21ab9cf067bb69d86ee70095170 /bin | |
parent | 28b442336218296ade8d2e98984f366945c8899c (diff) |
fix(tmux): regex to correctly deal with suspended nvim
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tmux-send | 2 |
1 files changed, 1 insertions, 1 deletions
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 |