From 64658619087326e37955fb1cb5342fd76a3acb75 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Thu, 13 Aug 2026 09:29:00 +0200 Subject: [PATCH] o: accept sname/aname syntax for new command --- data/scripts/o | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/data/scripts/o b/data/scripts/o index ce3c390..0df9d5c 100755 --- a/data/scripts/o +++ b/data/scripts/o @@ -251,8 +251,11 @@ cmd_log() { cmd_new() { if [[ -n "$CTX_AGENT" ]]; then - echo "error: cannot create nested agents" >&2 - exit 1 + # o session/agent new [cwd] — create the agent in that session + local agent_cwd="${1:-$PWD}" + printf 'name=%s\ncwd=%s\n' "$CTX_AGENT" "$agent_cwd" | ollie-9p write "session/$CTX_SESSION/agent/new" + echo "created agent: $CTX_SESSION/$CTX_AGENT" + return fi if [[ -n "$CTX_SESSION" ]]; then