From 28e0e0270e7bd763ccf6361834f3e00ae6cd5a33 Mon Sep 17 00:00:00 2001 From: Amolith Date: Wed, 3 Dec 2025 13:16:16 -0700 Subject: [PATCH] fix(agents): preserve flag arrays in output echo $flags concatenates array elements with spaces, causing all flags to be passed as a single argument. Using printf '%s\n' outputs one flag per line, which shells properly capture as separate array elements. Assisted-by: Claude Sonnet 4 via Crush --- fish/functions/_synu_agents/aider.fish | 2 +- fish/functions/_synu_agents/claude.fish | 4 ++-- fish/functions/_synu_agents/llxprt.fish | 2 +- fish/functions/_synu_agents/opencode.fish | 2 +- fish/functions/_synu_agents/qwen.fish | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fish/functions/_synu_agents/aider.fish b/fish/functions/_synu_agents/aider.fish index 6fe30c72d433dc8fa052344acbb73cf469a03d87..2dfc097e297cc1a79a98b60a9f62bc1403f75927 100644 --- a/fish/functions/_synu_agents/aider.fish +++ b/fish/functions/_synu_agents/aider.fish @@ -151,5 +151,5 @@ function _synu_agent_aider_interactive --description "Interactive model selectio end # Output flags for caller to use - echo $flags + printf '%s\n' $flags end diff --git a/fish/functions/_synu_agents/claude.fish b/fish/functions/_synu_agents/claude.fish index 2c17c6d8c907bb6653178be5f5e6a529bb04122c..d082641788c611d4c1b3aa284326fe72c0760c88 100644 --- a/fish/functions/_synu_agents/claude.fish +++ b/fish/functions/_synu_agents/claude.fish @@ -236,6 +236,6 @@ function _synu_agent_claude_interactive --description "Interactive model selecti end end - # Output flags for caller to use - echo $flags + # Output flags for caller to use (one per line for proper array capture) + printf '%s\n' $flags end diff --git a/fish/functions/_synu_agents/llxprt.fish b/fish/functions/_synu_agents/llxprt.fish index f3da9b5937707b7d828c1d7785018d81d3172166..02d9fe3ab5c4cb27003fd4e90f9b3188209c79a3 100644 --- a/fish/functions/_synu_agents/llxprt.fish +++ b/fish/functions/_synu_agents/llxprt.fish @@ -93,5 +93,5 @@ function _synu_agent_llxprt_interactive --description "Interactive model selecti end # Output flags for caller to use - echo $flags + printf '%s\n' $flags end diff --git a/fish/functions/_synu_agents/opencode.fish b/fish/functions/_synu_agents/opencode.fish index 1dca60cc87e11235a06ffbe33fc769112b5f8de7..57973d5bfe8be87b0ddb3a9934ec061659a4ba82 100644 --- a/fish/functions/_synu_agents/opencode.fish +++ b/fish/functions/_synu_agents/opencode.fish @@ -89,5 +89,5 @@ function _synu_agent_opencode_interactive --description "Interactive model selec end # Output flags for caller to use - echo $flags + printf '%s\n' $flags end diff --git a/fish/functions/_synu_agents/qwen.fish b/fish/functions/_synu_agents/qwen.fish index 313eb9e3864b594511cb59b8ee73ecd21c7bcfdc..9900ca871890c22ef2416da8d1c379ad269e7772 100644 --- a/fish/functions/_synu_agents/qwen.fish +++ b/fish/functions/_synu_agents/qwen.fish @@ -94,5 +94,5 @@ function _synu_agent_qwen_interactive --description "Interactive model selection end # Output flags for caller to use - echo $flags + printf '%s\n' $flags end