zmx

created pr with ps-221 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 pr-129 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print ps-X | 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 ps-221 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, 0 modified, 0 signature changed, 0 removed across 0 analyzed files (1 file skipped: unsupported file type)
+24 -9 src/completions.zig #
@@ -32,7 +32,7 @@ const bash_completions =
     \\  cur="${COMP_WORDS[COMP_CWORD]}"
     \\  prev="${COMP_WORDS[COMP_CWORD-1]}"
     \\
-    \\  local commands="attach run send detach list completions kill history version help"
+    \\  local commands="attach run send print write detach list kill history wait tail completions version help"
     \\
     \\  if [[ $COMP_CWORD -eq 1 ]]; then
     \\    COMPREPLY=($(compgen -W "$commands" -- "$cur"))
@@ -40,12 +40,12 @@ const bash_completions =
     \\  fi
     \\
     \\  case "$prev" in
-    \\    attach|run|send|kill|history)
+    \\    attach|run|send|print|write|kill|history|wait|tail)
     \\      local sessions=$(zmx list --short 2>/dev/null | tr '\n' ' ')
     \\      COMPREPLY=($(compgen -W "$sessions" -- "$cur"))
     \\      ;;
     \\    completions)
-    \\      COMPREPLY=($(compgen -W "bash zsh fish" -- "$cur"))
+    \\      COMPREPLY=($(compgen -W "bash zsh fish nu" -- "$cur"))
     \\      ;;
     \\    list)
     \\      COMPREPLY=($(compgen -W "--short" -- "$cur"))
@@ -77,11 +77,15 @@ const zsh_completions =
     \\        'attach:Attach to session, creating if needed'
     \\        'run:Send command without attaching'
     \\        'send:Send raw input to session PTY'
+    \\        'print:Inject text into session display'
+    \\        'write:Write stdin to file_path through the session'
     \\        'detach:Detach all clients from current session'
     \\        'list:List active sessions'
-    \\        'completions:Shell completion scripts'
     \\        'kill:Kill a session'
     \\        'history:Output session scrollback'
+    \\        'wait:Wait for session tasks to complete'
+    \\        'tail:Follow session output'
+    \\        'completions:Shell completion scripts'
     \\        'version:Show version'
     \\        'help:Show help message'
     \\      )
@@ -89,11 +93,11 @@ const zsh_completions =
     \\      ;;
     \\    args)
     \\      case $words[2] in
-    \\        attach|a|kill|k|run|r|send|s|history|hi)
+    \\        attach|a|kill|k|run|r|send|s|print|p|write|wr|history|hi|wait|w|tail|t)
     \\          _zmx_sessions
     \\          ;;
     \\        completions|c)
-    \\          _values 'shell' 'bash' 'zsh' 'fish'
+    \\          _values 'shell' 'bash' 'zsh' 'fish' 'nu'
     \\          ;;
     \\        list|l)
     \\          _values 'options' '--short'
@@ -131,6 +135,7 @@ const fish_completions =
     \\complete -c zmx -n "__fish_is_nth_token 1" -a attach -d 'Attach to session, creating if needed'
     \\complete -c zmx -n "__fish_is_nth_token 1" -a run -d 'Send command without attaching'
     \\complete -c zmx -n "__fish_is_nth_token 1" -a send -d 'Send raw input to session PTY'
+    \\complete -c zmx -n "__fish_is_nth_token 1" -a print -d 'Inject text into session display'
     \\complete -c zmx -n "__fish_is_nth_token 1" -a write -d 'Write stdin to file_path through the session'
     \\complete -c zmx -n "__fish_is_nth_token 1" -a detach -d 'Detach all clients (ctrl+\ for current client)'
     \\complete -c zmx -n "__fish_is_nth_token 1" -a list -d 'List active sessions'
@@ -138,15 +143,15 @@ const fish_completions =
     \\complete -c zmx -n "__fish_is_nth_token 1" -a history -d 'Output session scrollback'
     \\complete -c zmx -n "__fish_is_nth_token 1" -a wait -d 'Wait for session tasks to complete'
     \\complete -c zmx -n "__fish_is_nth_token 1" -a tail -d 'Follow session output'
-    \\complete -c zmx -n "__fish_is_nth_token 1" -a completions -d 'Shell completions (bash, zsh, fish)'
+    \\complete -c zmx -n "__fish_is_nth_token 1" -a completions -d 'Shell completions (bash, zsh, fish, nu)'
     \\complete -c zmx -n "__fish_is_nth_token 1" -a version -d 'Show version'
     \\complete -c zmx -n "__fish_is_nth_token 1" -a help -d 'Show help message'
     \\
     \\# Complete session names and shells
-    \\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'
+    \\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'
     \\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'
     \\
-    \\complete -c zmx -n "__fish_is_nth_token 2; and __fish_seen_subcommand_from c completions" -a 'bash zsh fish' -d Shell
+    \\complete -c zmx -n "__fish_is_nth_token 2; and __fish_seen_subcommand_from c completions" -a 'bash zsh fish nu' -d Shell
     \\
     \\# Subcommand flags
     \\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 =
     \\    ...rest: string
     \\]
     \\
+    \\export extern "zmx send" [
+    \\    name: string@"nu-complete zmx sessions"
+    \\    text: string
+    \\]
+    \\
+    \\export extern "zmx print" [
+    \\    name: string@"nu-complete zmx sessions"
+    \\    text: string
+    \\]
+    \\
     \\export extern "zmx write" [
     \\    name: string@"nu-complete zmx sessions"
     \\    path: path
Back to top