zmx

created pr with 129.1 on 2026-07-04T14:26:16Z · by a61b448c
changed status to accepted on 2026-07-17T18:10:45Z · by c8ef7d19
cmds
checkout latest patchset:
ssh pr.pico.sh print 129 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print 129.[rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 129
set PR to open (enables RSS notifications):
ssh pr.pico.sh pr open 129
set PR to draft (stops RSS notifications):
ssh pr.pico.sh pr draft 129

Patchset 129.1 on 2026-07-04T14:26:15Z · commit 1359e0c

fix: Add missing commands to completion scripts
Noelle Leigh 2026-07-04T14:09:20Z
- Add print, write, wait, and tail to the scripts in src/completions.zig
- Add 'nu' to 'zmx completions' completions (0a5a2a9)
Semantic diff summary
0 added, 7 modified, 0 signature changed, 0 removed across 1 analyzed file
+24 -9 src/completions.zig #
......@@ -32,7 +32,7 @@ const bash_completions =
3232 \\ cur="${COMP_WORDS[COMP_CWORD]}"
3333 \\ prev="${COMP_WORDS[COMP_CWORD-1]}"
3434 \\
35- \\ local commands="attach run send detach list completions kill history version help"
35+ \\ local commands="attach run send print write detach list kill history wait tail completions version help"
3636 \\
3737 \\ if [[ $COMP_CWORD -eq 1 ]]; then
3838 \\ COMPREPLY=($(compgen -W "$commands" -- "$cur"))
......@@ -40,12 +40,12 @@ const bash_completions =
4040 \\ fi
4141 \\
4242 \\ case "$prev" in
43- \\ attach|run|send|kill|history)
43+ \\ attach|run|send|print|write|kill|history|wait|tail)
4444 \\ local sessions=$(zmx list --short 2>/dev/null | tr '\n' ' ')
4545 \\ COMPREPLY=($(compgen -W "$sessions" -- "$cur"))
4646 \\ ;;
4747 \\ completions)
48- \\ COMPREPLY=($(compgen -W "bash zsh fish" -- "$cur"))
48+ \\ COMPREPLY=($(compgen -W "bash zsh fish nu" -- "$cur"))
4949 \\ ;;
5050 \\ list)
5151 \\ COMPREPLY=($(compgen -W "--short" -- "$cur"))
......@@ -77,11 +77,15 @@ const zsh_completions =
7777 \\ 'attach:Attach to session, creating if needed'
7878 \\ 'run:Send command without attaching'
7979 \\ 'send:Send raw input to session PTY'
80+ \\ 'print:Inject text into session display'
81+ \\ 'write:Write stdin to file_path through the session'
8082 \\ 'detach:Detach all clients from current session'
8183 \\ 'list:List active sessions'
82- \\ 'completions:Shell completion scripts'
8384 \\ 'kill:Kill a session'
8485 \\ 'history:Output session scrollback'
86+ \\ 'wait:Wait for session tasks to complete'
87+ \\ 'tail:Follow session output'
88+ \\ 'completions:Shell completion scripts'
8589 \\ 'version:Show version'
8690 \\ 'help:Show help message'
8791 \\ )
......@@ -89,11 +93,11 @@ const zsh_completions =
8993 \\ ;;
9094 \\ args)
9195 \\ case $words[2] in
92- \\ attach|a|kill|k|run|r|send|s|history|hi)
96+ \\ attach|a|kill|k|run|r|send|s|print|p|write|wr|history|hi|wait|w|tail|t)
9397 \\ _zmx_sessions
9498 \\ ;;
9599 \\ completions|c)
96- \\ _values 'shell' 'bash' 'zsh' 'fish'
100+ \\ _values 'shell' 'bash' 'zsh' 'fish' 'nu'
97101 \\ ;;
98102 \\ list|l)
99103 \\ _values 'options' '--short'
......@@ -131,6 +135,7 @@ const fish_completions =
131135 \\complete -c zmx -n "__fish_is_nth_token 1" -a attach -d 'Attach to session, creating if needed'
132136 \\complete -c zmx -n "__fish_is_nth_token 1" -a run -d 'Send command without attaching'
133137 \\complete -c zmx -n "__fish_is_nth_token 1" -a send -d 'Send raw input to session PTY'
138+ \\complete -c zmx -n "__fish_is_nth_token 1" -a print -d 'Inject text into session display'
134139 \\complete -c zmx -n "__fish_is_nth_token 1" -a write -d 'Write stdin to file_path through the session'
135140 \\complete -c zmx -n "__fish_is_nth_token 1" -a detach -d 'Detach all clients (ctrl+\ for current client)'
136141 \\complete -c zmx -n "__fish_is_nth_token 1" -a list -d 'List active sessions'
......@@ -138,15 +143,15 @@ const fish_completions =
138143 \\complete -c zmx -n "__fish_is_nth_token 1" -a history -d 'Output session scrollback'
139144 \\complete -c zmx -n "__fish_is_nth_token 1" -a wait -d 'Wait for session tasks to complete'
140145 \\complete -c zmx -n "__fish_is_nth_token 1" -a tail -d 'Follow session output'
141- \\complete -c zmx -n "__fish_is_nth_token 1" -a completions -d 'Shell completions (bash, zsh, fish)'
146+ \\complete -c zmx -n "__fish_is_nth_token 1" -a completions -d 'Shell completions (bash, zsh, fish, nu)'
142147 \\complete -c zmx -n "__fish_is_nth_token 1" -a version -d 'Show version'
143148 \\complete -c zmx -n "__fish_is_nth_token 1" -a help -d 'Show help message'
144149 \\
145150 \\# Complete session names and shells
146- \\complete -c zmx -n "__fish_is_nth_token 2; and __fish_seen_subcommand_from a attach r run s send wr write hi history" -a '(zmx list --short 2>/dev/null)' -d 'Session name'
151+ \\complete -c zmx -n "__fish_is_nth_token 2; and __fish_seen_subcommand_from a attach r run s send p print wr write hi history" -a '(zmx list --short 2>/dev/null)' -d 'Session name'
147152 \\complete -c zmx -n "not __fish_is_nth_token 1; and __fish_seen_subcommand_from k kill w wait t tail" -a '(zmx list --short 2>/dev/null)' -d 'Session name'
148153 \\
149- \\complete -c zmx -n "__fish_is_nth_token 2; and __fish_seen_subcommand_from c completions" -a 'bash zsh fish' -d Shell
154+ \\complete -c zmx -n "__fish_is_nth_token 2; and __fish_seen_subcommand_from c completions" -a 'bash zsh fish nu' -d Shell
150155 \\
151156 \\# Subcommand flags
152157 \\complete -c zmx -n "__fish_seen_subcommand_from r run" -s d -d 'Detach from the calling terminal; use `wait` to track its status'
......@@ -178,6 +183,16 @@ const nu_completions =
178183 \\ ...rest: string
179184 \\]
180185 \\
186+ \\export extern "zmx send" [
187+ \\ name: string@"nu-complete zmx sessions"
188+ \\ text: string
189+ \\]
190+ \\
191+ \\export extern "zmx print" [
192+ \\ name: string@"nu-complete zmx sessions"
193+ \\ text: string
194+ \\]
195+ \\
181196 \\export extern "zmx write" [
182197 \\ name: string@"nu-complete zmx sessions"
183198 \\ path: path
Back to top