-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
Bash aliases don't accept extra arguments. When you type:
unleashed-c-18-triplet --continueBash interprets --continue as a shell token, not as an argument to the Python script inside the alias. This causes:
bash: syntax error near unexpected token `--continue'
This blocks the v18 passthrough feature where unknown args (like --resume, --continue, --name) are forwarded to claude.cmd.
Root Cause
Current aliases are defined as:
alias unleashed-c-18-triplet='(PROJECT_PATH="$(cygpath -w "$(pwd)")" && cd /c/Users/mcwiz/Projects/unleashed && poetry run python src/unleashed-c-18.py --mirror --friction --cwd "$PROJECT_PATH")'Aliases are simple text substitution — there's no $@ or $1 to capture extra arguments.
Proposed Fix
Convert aliases to shell functions, which DO accept arguments via $@:
unleashed-c-18-triplet() {
(PROJECT_PATH="$(cygpath -w "$(pwd)")" && cd /c/Users/mcwiz/Projects/unleashed && poetry run python src/unleashed-c-18.py --mirror --friction --cwd "$PROJECT_PATH" "$@")
}The "$@" at the end passes all extra arguments through to the Python script.
Scope
This affects ALL unleashed aliases in .bash_profile (v07 through v18, both Claude and Gemini variants). However, since changing all of them at once is risky, the suggested approach is:
- Phase 1: Convert only the v18 aliases to functions (4 entries)
- Test thoroughly — ensure basic launch, flag passthrough, and subshell isolation all work
- Phase 2: If stable, convert remaining aliases to functions
Risk
- Functions and aliases have subtly different behavior in bash (quoting, subshell scope, precedence)
- The subshell
()wrapping is critical — it preventscdfrom changing the user's working directory - Need to verify that
"$@"inside()inside{}correctly passes arguments - A broken
.bash_profilecan lock out the entire shell environment
Testing
# Basic launch (no extra args) — should work identically to alias version
unleashed-c-18-triplet
# Passthrough args — should launch claude with --continue
unleashed-c-18-triplet --continue
# Passthrough with value — should resume specific session
unleashed-c-18-joint --resume 65fc85a1-d85e-443f-acbc-d48c48bff1e4
# Named session
unleashed-c-18 --name "test-session"Related
- v18
parse_known_args()inunleashed-c-18.pyalready handles the Python side — it consumes unleashed flags and passes the rest toclaude.cmd - This issue is the bash side of that same feature
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels