Commit 81243b9
Yi Zhou
·
2026-04-16 23:58:05 -0400 EDT
parent 66d1b8b
Update fish completions for zmx v0.5.0 (#134)
1 files changed,
+18,
-7
+18,
-7
| ... | ... | @@ -118,24 +118,35 @@ const zsh_completions = | |
| 118 | 118 | const fish_completions = | |
| 119 | 119 | \\complete -c zmx -f | |
| 120 | 120 | \\ | |
| 121 | + | \\# zmx flags | |
| 122 | + | \\complete -c zmx -x -n '__fish_is_nth_token 1' -s v -l version -d 'Show version' | |
| 123 | + | \\complete -c zmx -x -n '__fish_is_nth_token 1' -s h -d 'Show help message' | |
| 124 | + | \\ | |
| 125 | + | \\# zmx subcommands | |
| 121 | 126 | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'a attach' -d 'Attach to session, creating if needed' | |
| 122 | 127 | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'r run' -d 'Send command without attaching' | |
| 123 | - | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'd detach' -d 'Detach all clients from current session' | |
| 128 | + | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'wr write' -d 'Write stdin to file_path through the session' | |
| 129 | + | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'd detach' -d 'Detach all clients (ctrl+\ for current client)' | |
| 124 | 130 | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'l list' -d 'List active sessions' | |
| 125 | - | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'c completions' -d 'Shell completion scripts' | |
| 126 | - | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'k kill' -d 'Kill a session' | |
| 131 | + | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'k kill' -d 'Kill session and all attached clients' | |
| 127 | 132 | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'hi history' -d 'Output session scrollback' | |
| 128 | - | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'v version' -d 'Show version' | |
| 129 | - | \\complete -c zmx -s v -l version -d 'Show version' | |
| 130 | 133 | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'w wait' -d 'Wait for session tasks to complete' | |
| 134 | + | \\complete -c zmx -n "__fish_is_nth_token 1" -a 't tail' -d 'Follow session output' | |
| 135 | + | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'c completions' -d 'Shell completions (bash, zsh, fish)' | |
| 136 | + | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'v version' -d 'Show version' | |
| 131 | 137 | \\complete -c zmx -n "__fish_is_nth_token 1" -a 'h help' -d 'Show help message' | |
| 132 | - | \\complete -c zmx -s h -d 'Show help message' | |
| 133 | 138 | \\ | |
| 134 | - | \\complete -c zmx -n "__fish_is_nth_token 2; and __fish_seen_subcommand_from a attach r run k kill hi history w wait" -a '(zmx list --short 2>/dev/null)' -d 'Session name' | |
| 139 | + | \\# Complete session names and shells | |
| 140 | + | \\complete -c zmx -n "__fish_is_nth_token 2; and __fish_seen_subcommand_from a attach r run wr write hi history" -a '(zmx list --short 2>/dev/null)' -d 'Session name' | |
| 141 | + | \\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' | |
| 135 | 142 | \\ | |
| 136 | 143 | \\complete -c zmx -n "__fish_is_nth_token 2; and __fish_seen_subcommand_from c completions" -a 'bash zsh fish' -d Shell | |
| 137 | 144 | \\ | |
| 145 | + | \\# Subcommand flags | |
| 146 | + | \\complete -c zmx -n "__fish_seen_subcommand_from r run" -s d -d 'Detach from the calling terminal; use `wait` to track its status' | |
| 147 | + | \\complete -c zmx -n "__fish_seen_subcommand_from r run" -l fish -d 'Required when the session runs fish shell' | |
| 138 | 148 | \\complete -c zmx -n "__fish_seen_subcommand_from l list" -l short -d 'Short output' | |
| 149 | + | \\complete -c zmx -n "__fish_seen_subcommand_from k kill" -l force -d 'Force kill' | |
| 139 | 150 | \\complete -c zmx -n "__fish_seen_subcommand_from hi history" -l vt -d 'History format for escape sequences' | |
| 140 | 151 | \\complete -c zmx -n "__fish_seen_subcommand_from hi history" -l html -d 'History format for escape sequences' | |
| 141 | 152 | ; |