summaryrefslogtreecommitdiff
path: root/src/ninep/cols.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 13:54:40 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commite8fc2964acdf7156ab0c9961b7bf83d74f152192 (patch)
treeaf05298c50c8ba4237e2200ef2cf4b15e3b3e81e /src/ninep/cols.zig
parenta33fc226c32d97a053bafdb13d6ec3bf8b537f35 (diff)
downloadpardes-e8fc2964acdf7156ab0c9961b7bf83d74f152192.tar.gz
pardes-e8fc2964acdf7156ab0c9961b7bf83d74f152192.zip
DumpConfig's lines that set nothing start with #, and a line starting with # runs as nothing at an exec, a ctl or the init file
DumpConfig's information lines ("Platform: tty", "Startup config: ...") began with words. Written back, as the report means to be, or clicked, each ran as a shell command or failed as an unknown control message. Each now starts with `# `. A line starting with `#` is a comment, as in a shell: it runs as nothing, silently, at an exec, at the root's, a pane's or a column's ctl, and in the init file. Documented in fs.md and config.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/cols.zig')
-rw-r--r--src/ninep/cols.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig
index f07c7f39..24fb590c 100644
--- a/src/ninep/cols.zig
+++ b/src/ninep/cols.zig
@@ -163,7 +163,7 @@ pub fn writeCtl(p: *Pardes, req: Req, serial: u32) Reply {
var lines = std.mem.splitScalar(u8, req.data, '\n');
while (lines.next()) |raw| {
const line = std.mem.trim(u8, raw, " \t\r");
- if (line.len == 0) continue;
+ if (line.len == 0 or pardes.exec.isComment(line)) continue;
const word = line[0 .. std.mem.indexOfAny(u8, line, " \t") orelse line.len];
const takes = for ([_][]const u8{ "Delcol", "Joincol", "New", "Tty" }) |w| {
if (std.mem.eql(u8, w, word)) break true;