zmx
created pr with
127.1
cmds
checkout latest patchset:
ssh pr.pico.sh print 127 | git am -3checkout any patchset in a patch request:
ssh pr.pico.sh print 127.[rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 127
Patchset
127.1
feat(completions): add nushell
Benjamin Pollack
2026-05-13T00:37:23ZSemantic diff summary
0 added,
3 modified,
0 signature changed,
0 removed
across 1 analyzed file
+44
-0
src/completions.zig
#
| ... | ... | @@ -4,11 +4,13 @@ pub const Shell = enum { | |
| 4 | 4 | bash, | |
| 5 | 5 | zsh, | |
| 6 | 6 | fish, | |
| 7 | + | nu, | |
| 7 | 8 | ||
| 8 | 9 | pub fn fromString(s: []const u8) ?Shell { | |
| 9 | 10 | if (std.mem.eql(u8, s, "bash")) return .bash; | |
| 10 | 11 | if (std.mem.eql(u8, s, "zsh")) return .zsh; | |
| 11 | 12 | if (std.mem.eql(u8, s, "fish")) return .fish; | |
| 13 | + | if (std.mem.eql(u8, s, "nu")) return .nu; | |
| 12 | 14 | ||
| 13 | 15 | return null; | |
| 14 | 16 | } |
| ... | ... | @@ -153,3 +156,44 @@ const fish_completions = | |
| 153 | 156 | \\complete -c zmx -n "__fish_seen_subcommand_from hi history" -l vt -d 'History format for escape sequences' | |
| 154 | 157 | \\complete -c zmx -n "__fish_seen_subcommand_from hi history" -l html -d 'History format for escape sequences' | |
| 155 | 158 | ; | |
| 159 | + | ||
| 160 | + | const nu_completions = | |
| 161 | + | \\def "nu-complete zmx sessions" [] { | |
| 162 | + | \\ zmx list --short | lines | |
| 163 | + | \\} | |
| 164 | + | \\ | |
| 165 | + | \\def "nu-complete zmx complete" [] { | |
| 166 | + | \\ [bash fish nu zsh] | |
| 167 | + | \\} | |
| 168 | + | \\ | |
| 169 | + | \\export extern "zmx attach" [ | |
| 170 | + | \\ name: string@"nu-complete zmx sessions" | |
| 171 | + | \\ ...rest: string | |
| 172 | + | \\] | |
| 173 | + | \\ | |
| 174 | + | \\export extern "zmx run" [ | |
| 175 | + | \\ name: string@"nu-complete zmx sessions" | |
| 176 | + | \\ -d | |
| 177 | + | \\ --fish | |
| 178 | + | \\ ...rest: string | |
| 179 | + | \\] | |
| 180 | + | \\ | |
| 181 | + | \\export extern "zmx write" [ | |
| 182 | + | \\ name: string@"nu-complete zmx sessions" | |
| 183 | + | \\ path: path | |
| 184 | + | \\] | |
| 185 | + | \\ | |
| 186 | + | \\export extern "zmx kill" [ | |
| 187 | + | \\ --force | |
| 188 | + | \\ name: string@"nu-complete zmx sessions" | |
| 189 | + | \\] | |
| 190 | + | \\ | |
| 191 | + | \\export extern "zmx detach" [] | |
| 192 | + | \\export extern "zmx list" [--short] | |
| 193 | + | \\export extern "zmx history" [name: string@"nu-complete zmx sessions", --vt, --html] | |
| 194 | + | \\export extern "zmx wait" [...sessions: string@"nu-complete zmx sessions"] | |
| 195 | + | \\export extern "zmx tail" [...sessions: string@"nu-complete zmx sessions"] | |
| 196 | + | \\export extern "zmx version" [] | |
| 197 | + | \\export extern "completions" [shell: string@"nu-complete zmx complete"] | |
| 198 | + | \\export extern "zmx help" [] | |
| 199 | + | ; |