index.ts
commands/terminalSetup/index.ts
24
Lines
725
Bytes
0
Exports
2
Imports
10
Keywords
What this is
This page documents one file from the repository and includes its full source so you can read it without leaving the docs site.
Beginner explanation
This file lives in the command layer. It likely turns a user action into concrete program behavior.
How it is used
Start from the exports list and related files. Those are the easiest clues for where this file fits into the system.
Expert explanation
Architecturally, this file intersects with commands. It contains 24 lines, 2 detected imports, and 0 detected exports.
Important relationships
- commands/terminalSetup/terminalSetup.tsx
- commands/add-dir/index.ts
- commands/agents/index.ts
- commands/branch/index.ts
- commands/bridge/index.ts
- commands/btw/index.ts
- commands/chrome/index.ts
- commands/clear/index.ts
- commands/color/index.ts
- commands/compact/index.ts
- commands/config/index.ts
- commands/context/index.ts
Detected exports
- No clear exports detected.
Keywords
kittyterminalsetupterminalcommandnative_csiu_terminalsghosttyweztermenterbindingnewlines
Detected imports
../../commands.js../../utils/env.js
Source notes
This page embeds the full file contents. Small or leaf files are still indexed honestly instead of being over-explained.
Full source
import type { Command } from '../../commands.js'
import { env } from '../../utils/env.js'
// Terminals that natively support CSI u / Kitty keyboard protocol
const NATIVE_CSIU_TERMINALS: Record<string, string> = {
ghostty: 'Ghostty',
kitty: 'Kitty',
'iTerm.app': 'iTerm2',
WezTerm: 'WezTerm',
}
const terminalSetup = {
type: 'local-jsx',
name: 'terminal-setup',
description:
env.terminal === 'Apple_Terminal'
? 'Enable Option+Enter key binding for newlines and visual bell'
: 'Install Shift+Enter key binding for newlines',
isHidden: env.terminal !== null && env.terminal in NATIVE_CSIU_TERMINALS,
load: () => import('./terminalSetup.js'),
} satisfies Command
export default terminalSetup