Commit 61e5cb2
Zixuan Song
·
2026-07-22 10:10:04 -0400 EDT
parent 4ab0a60
doc: add alternative gentle-hint pattern for server SSH workflow (#175) The existing session-picker docs only show an auto-launch pattern (zmx-select && exit), which forces the picker on every SSH login. This is inconvenient on shared servers where quick commands are common. Add an alternative 'gentle hint' pattern that shows a one-line reminder when sessions exist, without blocking the shell.
1 files changed,
+19,
-0
+19,
-0
1@@ -282,6 +282,25 @@ if command -v zmx &> /dev/null && command -v fzf &> /dev/null && [[ -z "$ZMX_SES
2 fi
3 ```
4
5+#### Alternative: gentle hint (server use)
6+
7+If you use zmx on a shared server and SSH in frequently for quick operations,
8+auto-launching the picker on every connection may be too aggressive. Instead,
9+show a one-line reminder when active sessions exist:
10+
11+```bash
12+if command -v zmx &> /dev/null && [[ -z "$ZMX_SESSION" ]]; then
13+ local count
14+ count=$(zmx ls --short 2>/dev/null | wc -l)
15+ if [[ "$count" -gt 0 ]]; then
16+ echo "zmx: $count session(s) active — \`zmx-select\` to attach" >&2
17+ fi
18+fi
19+```
20+
21+Choose the auto-launch pattern for dedicated dev machines, and the hint
22+pattern for shared servers where you frequently run quick commands.
23+
24 </details>
25
26 ## session prefix