repos / zmx

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

commit
804e4e2
parent
1e4e888
author
Justin Su
date
2026-02-27 13:08:31 -0500 EST
Use `env_var` module in Starship prompt snippet (#66)

1 files changed,  +9, -10
M README.md
+9, -10
 1@@ -144,7 +144,7 @@ POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS+=my_zmx_session
 2 
 3 [oh-my-posh](https://ohmyposh.dev) is a popular shell themeing and prompt engine. This code will display an icon and session name as part of the prompt if (and only if) you have zmx active:
 4 
 5-```
 6+```toml
 7 [[blocks.segments]]
 8    template = '{{ if .Env.ZMX_SESSION }} {{ .Env.ZMX_SESSION }}{{ end }}'
 9    foreground = 'p:orange'
10@@ -153,21 +153,20 @@ POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS+=my_zmx_session
11    style = 'plain'
12 ```
13 
14-### starship
15+### Starship
16 
17-[starship](https://starship.rs) is a popular shell themeing and prompt engine. This code will display the session name as part of the prompt if (and only if) you have zmx active:
18+[Starship](https://starship.rs) is a popular shell themeing and prompt engine. This code will display an icon and session name as part of the prompt if (and only if) you have zmx active:
19 
20-```
21+```toml
22 format = """
23-${custom.zmx}\
24+${env_var.ZMX_SESSION}\
25 ...
26 """
27 
28-...
29-
30-[custom.zmx]
31-command = 'echo "[${ZMX_SESSION}]"'
32-when = 'test "${ZMX_SESSION}" != ""'
33+[env_var.ZMX_SESSION]
34+symbol = " "
35+format = "[$symbol$env_value]($style) "
36+description = "zmx session name"
37 style = "bold magenta"
38 ```
39