zmx

created pr with 127.1 on 2026-05-13T13:57:14Z · by bcbb7755
cmds
checkout latest patchset:
ssh pr.pico.sh print 127 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print 127.[rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 127

Patchset 127.1 on 2026-05-13T13:57:14Z · commit bfd641b

+44 -0 src/completions.zig #
......@@ -4,11 +4,13 @@ pub const Shell = enum {
44 bash,
55 zsh,
66 fish,
7+ nu,
78
89 pub fn fromString(s: []const u8) ?Shell {
910 if (std.mem.eql(u8, s, "bash")) return .bash;
1011 if (std.mem.eql(u8, s, "zsh")) return .zsh;
1112 if (std.mem.eql(u8, s, "fish")) return .fish;
13+ if (std.mem.eql(u8, s, "nu")) return .nu;
1214
1315 return null;
1416 }
......@@ -18,6 +20,7 @@ pub const Shell = enum {
1820 .bash => bash_completions,
1921 .zsh => zsh_completions,
2022 .fish => fish_completions,
23+ .nu => nu_completions,
2124 };
2225 }
2326 };
......@@ -153,3 +156,44 @@ const fish_completions =
153156 \\complete -c zmx -n "__fish_seen_subcommand_from hi history" -l vt -d 'History format for escape sequences'
154157 \\complete -c zmx -n "__fish_seen_subcommand_from hi history" -l html -d 'History format for escape sequences'
155158 ;
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+;
Back to top