From b78e0745b8fe07d95c63c227f7af4e0ae8b2656f Mon Sep 17 00:00:00 2001 From: Amolith Date: Wed, 3 Dec 2025 18:09:24 -0700 Subject: [PATCH] fix(aider)!: use long-form flags only Aider uses -m for --message and -e for --env-file. synu was using -m/--model and -e/--editor-model, causing ambiguity. Now synu only accepts --model and --editor-model (long form) for aider. Assisted-by: Claude Sonnet 4 via Crush --- fish/completions/synu.fish | 5 +++-- fish/functions/_synu_agents/aider.fish | 8 +++++--- zsh/completions/_synu.zsh | 6 ++---- zsh/functions/_synu_agents/aider.zsh | 5 +++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/fish/completions/synu.fish b/fish/completions/synu.fish index e0defd108d91805d6fdcd2a68a3010788e5dfd20..14c001988d0c68889f673192230d6a6de044c3ed 100644 --- a/fish/completions/synu.fish +++ b/fish/completions/synu.fish @@ -35,10 +35,11 @@ complete -c synu -n "__fish_seen_subcommand_from opencode" \ -s m -l model -r -d "Override model" # Aider-specific flags (when aider is the agent) +# Note: no short flags to avoid collision with aider's -m (--message) and -e (--env-file) complete -c synu -n "__fish_seen_subcommand_from aider" \ - -s m -l model -r -d "Main model" + -l model -r -d "Main model" complete -c synu -n "__fish_seen_subcommand_from aider" \ - -s e -l editor-model -r -d "Editor model (enables architect + editor mode)" + -l editor-model -r -d "Editor model (enables architect + editor mode)" # llxprt-specific flags (when llxprt is the agent) complete -c synu -n "__fish_seen_subcommand_from llxprt" \ diff --git a/fish/functions/_synu_agents/aider.fish b/fish/functions/_synu_agents/aider.fish index 15f758427543450fdba2d8ee20ed37f6f18b56a1..14d97a7dd68fb4f2f1ff886b878eea9741ea61b0 100644 --- a/fish/functions/_synu_agents/aider.fish +++ b/fish/functions/_synu_agents/aider.fish @@ -25,8 +25,9 @@ function _synu_aider_default --description "Get default model: _synu_aider_defau end function _synu_agent_aider_flags --description "Return argparse-compatible flag specification" - echo "m/model=" - echo "e/editor-model=" + # Note: no short flags to avoid collision with aider's -m (--message) and -e (--env-file) + echo "model=" + echo "editor-model=" end function _synu_agent_aider_env_vars --description "Return list of environment variables set by configure" @@ -36,7 +37,8 @@ end function _synu_agent_aider_configure --description "Configure Aider environment variables and model selection" # Parse flags passed from main synu - argparse 'm/model=' 'e/editor-model=' -- $argv + # Note: no short flags to avoid collision with aider's -m (--message) and -e (--env-file) + argparse 'model=' 'editor-model=' -- $argv or return 1 # Start with defaults (from cache or fallback) diff --git a/zsh/completions/_synu.zsh b/zsh/completions/_synu.zsh index 983c37c1a9b4f76f704447412cc3901638416565..27801f5b5123661226ddc721b97b5a3ebeef6ad0 100644 --- a/zsh/completions/_synu.zsh +++ b/zsh/completions/_synu.zsh @@ -64,10 +64,9 @@ case $state in '*::opencode arguments:_command_names -e' ;; aider) + # Note: no short flags to avoid collision with aider's -m (--message) and -e (--env-file) _arguments \ - '-m[Main model]:model:' \ '--model[Main model]:model:' \ - '-e[Editor model (enables architect + editor mode)]:model:' \ '--editor-model[Editor model (enables architect + editor mode)]:model:' \ '*::aider arguments:_command_names -e' ;; @@ -117,10 +116,9 @@ case $state in '*::arguments:_command_names -e' ;; aider) + # Note: no short flags to avoid collision with aider's -m (--message) and -e (--env-file) _arguments \ - '-m[Main model]:model:' \ '--model[Main model]:model:' \ - '-e[Editor model]:model:' \ '--editor-model[Editor model]:model:' \ '*::aider arguments:_command_names -e' ;; diff --git a/zsh/functions/_synu_agents/aider.zsh b/zsh/functions/_synu_agents/aider.zsh index f9f88815e210d0e908170a108f5e7719cb1e7172..06349c566d68c0fbe0cd014f0061b32bdc7e6f6a 100644 --- a/zsh/functions/_synu_agents/aider.zsh +++ b/zsh/functions/_synu_agents/aider.zsh @@ -23,8 +23,9 @@ _synu_aider_default() { } _synu_agent_aider_flags() { - echo "m/model=" - echo "e/editor-model=" + # Note: no short flags to avoid collision with aider's -m (--message) and -e (--env-file) + echo "model=" + echo "editor-model=" } _synu_agent_aider_env_vars() {