- commit
- 129875f
- parent
- 50db1df
- author
- Radosław Stachowiak
- date
- 2026-04-26 17:17:54 -0400 EDT
feat: accept ls as list alias to help our muscle memory
4 files changed,
+10,
-3
+1,
-0
1@@ -8,6 +8,7 @@ Use spec: https://common-changelog.org/
2
3 - `zmx send` send raw bytes to session without ZMX completion marker or auto-newline
4 - `zmx print` send raw bytes to client's stdout
5+- `zmx ls` is accepted as an alias for `zmx list`
6
7 ### Fixed
8
+1,
-1
1@@ -83,7 +83,7 @@ Commands:
2 [p]rint <name> <text...> Inject text into session display
3 [wr]ite <name> <file_path> Write stdin to file_path through the session
4 [d]etach Detach all clients (ctrl+\\ for current client)
5- [l]ist [--short] List active sessions
6+ [l]ist|ls [--short] List active sessions
7 [k]ill <name>... [--force] Kill session and all attached clients
8 [hi]story <name> [--vt|--html] Output session scrollback
9 [w]ait <name>... Wait for session tasks to complete
+2,
-2
1@@ -99,7 +99,7 @@ pub fn main() !void {
2 return printVersion(&cfg);
3 } else if (std.mem.eql(u8, cmd, "help") or std.mem.eql(u8, cmd, "h") or std.mem.eql(u8, cmd, "-h")) {
4 return help();
5- } else if (std.mem.eql(u8, cmd, "list") or std.mem.eql(u8, cmd, "l")) {
6+ } else if (std.mem.eql(u8, cmd, "list") or std.mem.eql(u8, cmd, "l") or std.mem.eql(u8, cmd, "ls")) {
7 const short = if (args.next()) |arg| std.mem.eql(u8, arg, "--short") else false;
8 return list(&cfg, short);
9 } else if (std.mem.eql(u8, cmd, "completions") or std.mem.eql(u8, cmd, "c")) {
10@@ -1234,7 +1234,7 @@ fn help() !void {
11 \\ [p]rint <name> <text...> Inject text into session display
12 \\ [wr]ite <name> <file_path> Write stdin to file_path through the session
13 \\ [d]etach Detach all clients (ctrl+\\ for current client)
14- \\ [l]ist [--short] List active sessions
15+ \\ [l]ist|ls [--short] List active sessions
16 \\ [k]ill <name>... [--force] Kill session and all attached clients
17 \\ [hi]story <name> [--vt|--html] Output session scrollback
18 \\ [w]ait <name>... Wait for session tasks to complete
+6,
-0
1@@ -100,6 +100,12 @@ load test_helper
2 [[ "$output" == *"no sessions found"* ]]
3 }
4
5+@test "ls aliases list" {
6+ run "$ZMX" ls
7+ [ "$status" -eq 0 ]
8+ [[ "$output" == *"no sessions found"* ]]
9+}
10+
11 @test "list: shows session details" {
12 "$ZMX" run test-list -d echo hello
13 wait_for_session test-list