From 1d4cc6df726d699fb86bb01cca393fc3dd5b2c8e Mon Sep 17 00:00:00 2001 From: shokinn Date: Fri, 24 Jul 2026 10:05:30 +0200 Subject: [PATCH] Enhance claude-codex function to support YOLO mode and improve argument handling --- dotfiles/commonfunc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dotfiles/commonfunc b/dotfiles/commonfunc index 20765ff..b4e02e6 100644 --- a/dotfiles/commonfunc +++ b/dotfiles/commonfunc @@ -115,6 +115,8 @@ fabric() { claude-codex() { local gateway_url="${CLAUDE_CODEX_BASE_URL:-http://localhost:18765}" local model + local yolo_reply + local -a claude_args=("$@") local -a models=() local -a fallback_models=( gpt-5.6-sol @@ -145,6 +147,11 @@ claude-codex() { done fi + if read -q "yolo_reply?Run Claude in YOLO mode? [y/N] "; then + claude_args+=(--dangerously-skip-permissions) + fi + print + ANTHROPIC_BASE_URL="${gateway_url}" \ ANTHROPIC_AUTH_TOKEN=unused \ ANTHROPIC_MODEL="${model}[1m]" \ @@ -152,7 +159,7 @@ claude-codex() { CLAUDE_CODE_AUTO_COMPACT_WINDOW=272000 \ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 \ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK=1 \ - command claude "$@" + command claude "${claude_args[@]}" } #######################################