source dump of claude code
at main 23 lines 725 B view raw
1import type { Command } from '../../commands.js' 2import { env } from '../../utils/env.js' 3 4// Terminals that natively support CSI u / Kitty keyboard protocol 5const NATIVE_CSIU_TERMINALS: Record<string, string> = { 6 ghostty: 'Ghostty', 7 kitty: 'Kitty', 8 'iTerm.app': 'iTerm2', 9 WezTerm: 'WezTerm', 10} 11 12const terminalSetup = { 13 type: 'local-jsx', 14 name: 'terminal-setup', 15 description: 16 env.terminal === 'Apple_Terminal' 17 ? 'Enable Option+Enter key binding for newlines and visual bell' 18 : 'Install Shift+Enter key binding for newlines', 19 isHidden: env.terminal !== null && env.terminal in NATIVE_CSIU_TERMINALS, 20 load: () => import('./terminalSetup.js'), 21} satisfies Command 22 23export default terminalSetup