repos / zmx

session persistence for terminal processes
git clone https://github.com/neurosnap/zmx.git

commit
00c422e
parent
686ee94
author
Eric Bower
date
2025-11-26 14:57:27 -0500 EST
docs(readme): shell prompt section
1 files changed,  +19, -0
M README.md
+19, -0
 1@@ -30,6 +30,25 @@ session persistence for terminal processes
 2 - [ ] How to add debug logs without disrupting active client terminal output
 3 - [ ] Binary distribution (e.g. pkg managers)
 4 
 5+## shell prompt
 6+
 7+When you attach to a zmx session, we don't provide any indication that you are inside zmx. We do provide an environment variable `ZMX_SESSION` which contains the session name.
 8+
 9+We recommend checking for that env var inside your prompt and displaying some indication there.
10+
11+### fish
12+
13+```fish
14+functions -c fish_prompt _original_fish_prompt 2>/dev/null
15+
16+function fish_prompt --description 'Write out the prompt'
17+  if set -q ZMX_SESSION
18+    echo -n "[$ZMX_SESSION] "
19+  end
20+  _original_fish_prompt
21+end
22+```
23+
24 ## prior art
25 
26 Below is a list of projects that inspired me to build this project.