diff options
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main.zig b/src/main.zig index 36d2da75..864e2485 100644 --- a/src/main.zig +++ b/src/main.zig @@ -268,10 +268,11 @@ const cmds = std.EnumArray(Cmd, Doc).init(.{ .group = .Sessions, .line = "the daemon's sessions, their clients and shells", .doc = - \\What the per-user daemon keeps: each session with its name, pid, kind - \\(tty or gui) and whether one is attached; under it its clients and its - \\shells; then the shells no session holds, which Adopt takes. /sessions - \\is the same list, read from inside a session. + \\What the per-user daemon lists: each session with its name, pid, kind + \\(tty or gui) and whether it has a frontend of its own or is detached; + \\under it its clients and its shells; then the shells no session holds, + \\which Adopt takes. /sessions is the same list, read from inside a + \\session (where a session with a frontend says attached). , .examples = &.{.{ "pardes ps", "every session, client and shell" }}, .see = "attach, kill, /sessions", @@ -283,8 +284,8 @@ const cmds = std.EnumArray(Cmd, Doc).init(.{ .doc = \\Show a detached session here: in this terminal for pardes, a window \\for pardes-gui. Bare, the one detached session (with none, the one - \\session). One attached already, or of the other kind, is joined as a - \\client. HOST:NAME is a client of session NAME on another machine, + \\session). One with a frontend already, or of the other kind, is joined + \\as a client. HOST:NAME is a client of session NAME on another machine, \\over `ssh -L` to its pardes-replica.sock ($PARDES_SSH: the ssh \\command, default ssh; $PARDES_REMOTE_RUNTIME: its runtime directory, \\if not this one's path); SOCK:NAME goes through a socket forwarded @@ -467,7 +468,7 @@ const flags = std.EnumArray(Flag, FlagDoc).init(.{ .@"--9p-tcp" = .{ .arg = "=tcp!IP!PORT", .takes = .eq, .doc = "also serve 9P there, a numeric address" }, .@"--mount" = .{ .arg = "=NAME=DIAL", .takes = .eq, .doc = "a 9P session or Unix/TCP endpoint under /n/NAME; repeat for more; os and self are reserved" }, .@"--geometry" = .{ .arg = "=WxH[+X+Y]", .takes = .eq, .doc = "the window's size in points, and where it goes where the display lets a window say (X11)" }, - .@"--detach" = .{ .arg = "[=NAME]", .takes = .maybe, .doc = "no terminal (no window) until one attaches; panes, shells and files stay; NAME (one path component) rather than the pid. One pardes --daemon per user keeps sessions (PARDES_DAEMON=off: none)" }, + .@"--detach" = .{ .arg = "[=NAME]", .takes = .maybe, .doc = "no terminal (no window) until one attaches; panes, shells and files stay; NAME (one path component) rather than the pid. One pardes --daemon per user lists them, for attach (PARDES_DAEMON=off: none)" }, .@"-w" = .{ .group = .open }, .@"--wait" = .{ .group = .open, .doc = "in a pane, hand FILE to its session and return once its pane is deleted: 0, or 1 if the session goes (EDITOR='pardes --wait')" }, .@"--" = .{ .group = .open, .doc = "the end of the flags: pardes -- -name opens -name" }, @@ -1612,7 +1613,7 @@ fn manage(io: std.Io, verb: enum { list, kill, killall }, name: []const u8) nore .session => { const kind = it.next() orelse ""; const state = it.next() orelse ""; - w.print(" session {s} {s} ({s}, {s})\n", .{ std.mem.trim(u8, it.rest(), " "), pid, kind, state }) catch break; + w.print(" session {s} {s} ({s}, {s})\n", .{ std.mem.trim(u8, it.rest(), " "), pid, kind, if (std.mem.eql(u8, state, "attached")) "has a frontend" else state }) catch break; }, .client => w.print(" client {s} {s}\n", .{ pid, comm }) catch break, .shell => w.print(" shell {s} {s}\n", .{ pid, comm }) catch break, |
