From 368d1a9ba05169d5a0676cdb379b30e62ad52236 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Mon, 13 Apr 2026 13:56:52 +0200 Subject: [PATCH] 9p: accept empty values in s/new, fix docs to rm -r --- README.md | 4 ++-- internal/p9/server.go | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 914d8df..3ecc908 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ollie/ pl/ dir: plans s/ dir: one entry per active session, sorted by creation time new r/w: read: KV template; write: create session - / rm to kill session + / rm -r to kill session prompt write: submit a prompt to the agent enqueue write: queue a prompt for later execution dequeue read: pop the next queued prompt @@ -116,7 +116,7 @@ Writes to `backend`, `model`, and `agent` are rejected with an error when the ag ### Kill a session ```sh -rm ~/mnt/ollie/s/ +rm -r ~/mnt/ollie/s/ ``` ## Example shell session diff --git a/internal/p9/server.go b/internal/p9/server.go index 6a1f966..95e6bed 100644 --- a/internal/p9/server.go +++ b/internal/p9/server.go @@ -7,7 +7,7 @@ // pl/ (dir) plans // s/ (dir) session directory // new (r/w) read: KV template; write: create session -// {session-id}/ rm to kill session +// {session-id}/ rm -r to kill session // ctl (write) session control: compact, clear, interrupt // prompt (write) submit a prompt to the agent // enqueue (write) queue a prompt for later execution @@ -945,9 +945,12 @@ func (s *Server) createSession(args []string) error { for _, arg := range args { k, v, ok := strings.Cut(arg, "=") - if !ok || v == "" { + if !ok { return fmt.Errorf("invalid option %q (expected key=value)", arg) } + if v == "" { + continue + } switch k { case "backend": backendOverride = v