From 4682d25093bf713b0c40c80080bd6a41811d38d5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 30 Jun 2025 02:20:11 +0200 Subject: [PATCH] servers/paths --- sh/tmux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 5285186..8c5770a 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -21,9 +21,11 @@ rwx_tmux_servers() { local active=\"\$(rwx_tmux_server)\" local ifs=\"\${IFS}\" local name path text + local paths=\"\$(lsof -U | + awk \"/^tmux:.*\\(LISTEN\\)\$/ {print \\\$9}\")\" IFS=\" \" - for path in \$(lsof -U | awk \"/^tmux:.*\\(LISTEN\\)\$/ {print \$9}\"); do + for path in \${paths}; do name=\"\$(basename \"\${path}\")\" if [ \"\${active}\" = \"\${name}\" ]; then text=\"\${text}#[fg=green]\"