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
......@@ -226,10 +226,10 @@ Requires [fzf](https://github.com/junegunn/fzf).
226226 zmx-select() {
227227 local display
228228 display=$(zmx list 2>/dev/null | while IFS=$'\t' read -r name pid clients created dir; do
229- name=${name#session_name=}
230- pid=${pid#pid=}
231- clients=${clients#clients=}
232- dir=${dir#started_in=}
229+ name=${name#*name=}
230+ pid=${pid#*pid=}
231+ clients=${clients#*clients=}
232+ dir=${dir#*start_dir=}
233233 printf "%-20s pid:%-8s clients:%-2s %s\n" "$name" "$pid" "$clients" "$dir"
234234 done)
235235