Integrations

Hold any shell integration that powers the tool.

BASH_INTERACTIVE: str = '\n# Command Line Assistant Interactive Mode Integration\n__c_interactive() {\n    # Save current terminal state\n    local old_tty=$(stty -g)\n    local c_binary=/usr/bin/c\n\n    # Function to restore terminal state\n    cleanup() {\n        stty "$old_tty"\n    }\n\n    # Set cleanup on exit\n    trap cleanup EXIT\n\n    # Configure terminal for interactive input\n    stty sane  # Reset terminal to sane state\n    stty echo  # Ensure input is echoed (visible)\n    stty icanon # Enable canonical mode (line-by-line input)\n\n    # Start interactive mode\n    if command -v $c_binary >/dev/null 2>&1; then\n        $c_binary --interactive\n    else\n        echo "Error: Command Line Assistant is not installed"\n        return 1\n    fi\n\n    # Explicitly restore terminal state after c --interactive exits\n    cleanup\n}\n\n# Bind Ctrl+g to the interactive function\nbind -x \'"\\C-g": __c_interactive\'\n'

Bash interactive session for c.