From 063ed2b47b5e8889ee87154f8cdda03d732d0bf9 Mon Sep 17 00:00:00 2001 From: operator Date: Mon, 5 Oct 2026 16:05:50 +0000 Subject: [PATCH] fix(cli): treat leading non-flag argument as target account for precise error feedback --- bin/muse | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/bin/muse b/bin/muse index 1056138..54cff01 100755 --- a/bin/muse +++ b/bin/muse @@ -39,15 +39,10 @@ show_usage() { ACCOUNT="" POSITIONAL=() -# Pre-check if first argument is a valid account name (e.g. 'muse 646 ...') -if [[ $# -gt 0 ]]; then - for acct in "${VALID_ACCOUNTS[@]}"; do - if [[ "$1" == "$acct" ]]; then - ACCOUNT="$1" - shift - break - fi - done +# If first argument does not start with '-', treat it as the account candidate +if [[ $# -gt 0 && "$1" != -* ]]; then + ACCOUNT="$1" + shift fi while [[ $# -gt 0 ]]; do