Commit 609f4e3
Scott Abernethy
·
2026-06-18 15:47:16 -0400 EDT
parent df2a09b
fix(docs): correct zmx-select field parsing in session picker (#172) The zmx-select snippet stripped field prefixes (session_name=, started_in=) that don't match the actual `zmx list` output, so the session name displayed as "name=test" instead of "test" and attach failed. Use glob strips (#*name=, #*start_dir=) which match the real prefixes and also swallow the leading "→ "/" " current-session marker. Fixes #153 Co-authored-by: freqyfreqy <freqyfreqy@users.noreply.github.com>
1 files changed,
+4,
-4
+4,
-4
1@@ -226,10 +226,10 @@ Requires [fzf](https://github.com/junegunn/fzf).
2 zmx-select() {
3 local display
4 display=$(zmx list 2>/dev/null | while IFS=$'\t' read -r name pid clients created dir; do
5- name=${name#session_name=}
6- pid=${pid#pid=}
7- clients=${clients#clients=}
8- dir=${dir#started_in=}
9+ name=${name#*name=}
10+ pid=${pid#*pid=}
11+ clients=${clients#*clients=}
12+ dir=${dir#*start_dir=}
13 printf "%-20s pid:%-8s clients:%-2s %s\n" "$name" "$pid" "$clients" "$dir"
14 done)
15