Skip to content

Commit 212601e

Browse files
authored
Merge pull request #35 from alex-feel/alex-feel-dev
Bash wrapper now executes directly instead of going through PowerShell
2 parents 3fa8313 + ce7a6d3 commit 212601e

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

scripts/setup-python-environment.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,28 @@ def register_global_command(launcher_path: Path) -> bool:
449449
bash_wrapper_path = local_bin / 'claude-python'
450450
bash_content = '''#!/bin/bash
451451
# Bash wrapper for claude-python to work in Git Bash
452-
exec ~/.local/bin/claude-python.cmd "$@"
452+
453+
# Path to the Python developer prompt
454+
PROMPT_PATH="$HOME/.claude/prompts/python-developer.md"
455+
456+
if [ ! -f "$PROMPT_PATH" ]; then
457+
echo "Error: Python developer prompt not found at $PROMPT_PATH"
458+
echo "Please run setup-python-environment.py first"
459+
exit 1
460+
fi
461+
462+
echo "Starting Claude Code with Python developer configuration..."
463+
464+
# Read the prompt content and pass it directly to claude
465+
PROMPT_CONTENT=$(cat "$PROMPT_PATH")
466+
467+
# Pass all arguments to claude with the system prompt
468+
if [ $# -gt 0 ]; then
469+
echo "Passing additional arguments: $@"
470+
claude --append-system-prompt "$PROMPT_CONTENT" "$@"
471+
else
472+
claude --append-system-prompt "$PROMPT_CONTENT"
473+
fi
453474
'''
454475
bash_wrapper_path.write_text(bash_content, newline='\n') # Use Unix line endings
455476
# Make it executable (Git Bash respects this even on Windows)

0 commit comments

Comments
 (0)