From 8ffbf3b699f820b4aca7860871661e31f031eb1b Mon Sep 17 00:00:00 2001 From: Ollie Agent Date: Tue, 4 Aug 2026 18:56:47 +0200 Subject: [PATCH] o prompt: use . as send trigger, empty lines add newlines --- data/scripts/o | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/data/scripts/o b/data/scripts/o index d4d794c..9c4ca0f 100755 --- a/data/scripts/o +++ b/data/scripts/o @@ -252,7 +252,7 @@ cmd_prompt() { path="session/$s/agent/$a" echo "[$s/$a]" - echo "Enter prompts (blank line sends, Ctrl+D exits)." + echo "Type . on a blank line to send, Ctrl+D to exit." echo "Slash commands: /stop /compact /kill /clear /model /backend /cwd /help" echo "" @@ -298,10 +298,18 @@ cmd_prompt() { esac continue fi + if [[ "$line" == "." ]]; then + # Send prompt on "." alone + if [[ -n "$buf" ]]; then + history -s "$buf" + printf '%s\n' "$buf" | ollie-9p write "$path/prompt" + buf="" + fi + continue + fi if [[ -z "$line" && -n "$buf" ]]; then - history -s "$buf" - printf '%s\n' "$buf" | ollie-9p write "$path/prompt" - buf="" + # Empty line during multi-line input: append newline + buf="$buf"$'\n' elif [[ -z "$line" ]]; then continue else