diff options
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig index ab5047ce..b4f97128 100644 --- a/src/main.zig +++ b/src/main.zig @@ -110,7 +110,8 @@ const help_text = \\ --detach name, else its pid) \\ --attach=<host>:<name> a client of session <name> on another machine, \\ over `ssh -L` to its pardes-replica.sock - \\ ($PARDES_SSH: the ssh command, words; and + \\ ($PARDES_SSH: the ssh command, words, default + \\ `ssh -C`; and \\ $PARDES_REMOTE_RUNTIME: its runtime directory, \\ if not this one's path). Its keys show at once \\ --attach=<sock>:<name> ...through that socket (a path, with a '/'), @@ -860,7 +861,10 @@ fn remoteAttach(init: std.process.Init, opts: pardes.Options, where: []const u8, var argv: [48:null]?[*:0]const u8 = @splat(null); var n: usize = 0; var words_buf: [1024]u8 = undefined; - var words = std.mem.tokenizeScalar(u8, std.mem.span(std.c.getenv("PARDES_SSH") orelse "ssh"), ' '); + // Compressed by default: the join's dump is text, and the FreeBSD box's + // link carries 170 to 400 KB/s (a 3.9 MB join: 7.8 s plain, 5.4 with + // -C). $PARDES_SSH, when set, is the whole command. + var words = std.mem.tokenizeScalar(u8, std.mem.span(std.c.getenv("PARDES_SSH") orelse "ssh -C"), ' '); var at: usize = 0; while (words.next()) |w| { if (n >= 40 or at + w.len + 1 > words_buf.len) Say.no(io, "PARDES_SSH has too many words", .{}); |
