mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 05:55:17 -07:00
Merge branch 'main' into adibakm/clear-context-conversation-approval
This commit is contained in:
@@ -8,126 +8,173 @@ available combinations.
|
|||||||
|
|
||||||
#### Basic Controls
|
#### Basic Controls
|
||||||
|
|
||||||
| Action | Keys |
|
| Command | Action | Keys |
|
||||||
| --------------------------------------------------------------- | ------------------- |
|
| --------------- | --------------------------------------------------------------- | ------------------- |
|
||||||
| Confirm the current selection or choice. | `Enter` |
|
| `basic.confirm` | Confirm the current selection or choice. | `Enter` |
|
||||||
| Dismiss dialogs or cancel the current focus. | `Esc`<br />`Ctrl+[` |
|
| `basic.cancel` | Dismiss dialogs or cancel the current focus. | `Esc`<br />`Ctrl+[` |
|
||||||
| Cancel the current request or quit the CLI when input is empty. | `Ctrl+C` |
|
| `basic.quit` | Cancel the current request or quit the CLI when input is empty. | `Ctrl+C` |
|
||||||
| Exit the CLI when the input buffer is empty. | `Ctrl+D` |
|
| `basic.exit` | Exit the CLI when the input buffer is empty. | `Ctrl+D` |
|
||||||
|
|
||||||
#### Cursor Movement
|
#### Cursor Movement
|
||||||
|
|
||||||
| Action | Keys |
|
| Command | Action | Keys |
|
||||||
| ------------------------------------------- | ------------------------------------------ |
|
| ------------------ | ------------------------------------------- | ------------------------------------------ |
|
||||||
| Move the cursor to the start of the line. | `Ctrl+A`<br />`Home` |
|
| `cursor.home` | Move the cursor to the start of the line. | `Ctrl+A`<br />`Home` |
|
||||||
| Move the cursor to the end of the line. | `Ctrl+E`<br />`End` |
|
| `cursor.end` | Move the cursor to the end of the line. | `Ctrl+E`<br />`End` |
|
||||||
| Move the cursor up one line. | `Up` |
|
| `cursor.up` | Move the cursor up one line. | `Up` |
|
||||||
| Move the cursor down one line. | `Down` |
|
| `cursor.down` | Move the cursor down one line. | `Down` |
|
||||||
| Move the cursor one character to the left. | `Left` |
|
| `cursor.left` | Move the cursor one character to the left. | `Left` |
|
||||||
| Move the cursor one character to the right. | `Right`<br />`Ctrl+F` |
|
| `cursor.right` | Move the cursor one character to the right. | `Right`<br />`Ctrl+F` |
|
||||||
| Move the cursor one word to the left. | `Ctrl+Left`<br />`Alt+Left`<br />`Alt+B` |
|
| `cursor.wordLeft` | Move the cursor one word to the left. | `Ctrl+Left`<br />`Alt+Left`<br />`Alt+B` |
|
||||||
| Move the cursor one word to the right. | `Ctrl+Right`<br />`Alt+Right`<br />`Alt+F` |
|
| `cursor.wordRight` | Move the cursor one word to the right. | `Ctrl+Right`<br />`Alt+Right`<br />`Alt+F` |
|
||||||
|
|
||||||
#### Editing
|
#### Editing
|
||||||
|
|
||||||
| Action | Keys |
|
| Command | Action | Keys |
|
||||||
| ------------------------------------------------ | -------------------------------------------------------- |
|
| ---------------------- | ------------------------------------------------ | -------------------------------------------------------- |
|
||||||
| Delete from the cursor to the end of the line. | `Ctrl+K` |
|
| `edit.deleteRightAll` | Delete from the cursor to the end of the line. | `Ctrl+K` |
|
||||||
| Delete from the cursor to the start of the line. | `Ctrl+U` |
|
| `edit.deleteLeftAll` | Delete from the cursor to the start of the line. | `Ctrl+U` |
|
||||||
| Clear all text in the input field. | `Ctrl+C` |
|
| `edit.clear` | Clear all text in the input field. | `Ctrl+C` |
|
||||||
| Delete the previous word. | `Ctrl+Backspace`<br />`Alt+Backspace`<br />`Ctrl+W` |
|
| `edit.deleteWordLeft` | Delete the previous word. | `Ctrl+Backspace`<br />`Alt+Backspace`<br />`Ctrl+W` |
|
||||||
| Delete the next word. | `Ctrl+Delete`<br />`Alt+Delete`<br />`Alt+D` |
|
| `edit.deleteWordRight` | Delete the next word. | `Ctrl+Delete`<br />`Alt+Delete`<br />`Alt+D` |
|
||||||
| Delete the character to the left. | `Backspace`<br />`Ctrl+H` |
|
| `edit.deleteLeft` | Delete the character to the left. | `Backspace`<br />`Ctrl+H` |
|
||||||
| Delete the character to the right. | `Delete`<br />`Ctrl+D` |
|
| `edit.deleteRight` | Delete the character to the right. | `Delete`<br />`Ctrl+D` |
|
||||||
| Undo the most recent text edit. | `Cmd/Win+Z`<br />`Alt+Z` |
|
| `edit.undo` | Undo the most recent text edit. | `Cmd/Win+Z`<br />`Alt+Z` |
|
||||||
| Redo the most recent undone text edit. | `Ctrl+Shift+Z`<br />`Shift+Cmd/Win+Z`<br />`Alt+Shift+Z` |
|
| `edit.redo` | Redo the most recent undone text edit. | `Ctrl+Shift+Z`<br />`Shift+Cmd/Win+Z`<br />`Alt+Shift+Z` |
|
||||||
|
|
||||||
#### Scrolling
|
#### Scrolling
|
||||||
|
|
||||||
| Action | Keys |
|
| Command | Action | Keys |
|
||||||
| ------------------------ | ----------------------------- |
|
| ----------------- | ------------------------ | ----------------------------- |
|
||||||
| Scroll content up. | `Shift+Up` |
|
| `scroll.up` | Scroll content up. | `Shift+Up` |
|
||||||
| Scroll content down. | `Shift+Down` |
|
| `scroll.down` | Scroll content down. | `Shift+Down` |
|
||||||
| Scroll to the top. | `Ctrl+Home`<br />`Shift+Home` |
|
| `scroll.home` | Scroll to the top. | `Ctrl+Home`<br />`Shift+Home` |
|
||||||
| Scroll to the bottom. | `Ctrl+End`<br />`Shift+End` |
|
| `scroll.end` | Scroll to the bottom. | `Ctrl+End`<br />`Shift+End` |
|
||||||
| Scroll up by one page. | `Page Up` |
|
| `scroll.pageUp` | Scroll up by one page. | `Page Up` |
|
||||||
| Scroll down by one page. | `Page Down` |
|
| `scroll.pageDown` | Scroll down by one page. | `Page Down` |
|
||||||
|
|
||||||
#### History & Search
|
#### History & Search
|
||||||
|
|
||||||
| Action | Keys |
|
| Command | Action | Keys |
|
||||||
| -------------------------------------------- | -------- |
|
| ----------------------- | -------------------------------------------- | -------- |
|
||||||
| Show the previous entry in history. | `Ctrl+P` |
|
| `history.previous` | Show the previous entry in history. | `Ctrl+P` |
|
||||||
| Show the next entry in history. | `Ctrl+N` |
|
| `history.next` | Show the next entry in history. | `Ctrl+N` |
|
||||||
| Start reverse search through history. | `Ctrl+R` |
|
| `history.search.start` | Start reverse search through history. | `Ctrl+R` |
|
||||||
| Submit the selected reverse-search match. | `Enter` |
|
| `history.search.submit` | Submit the selected reverse-search match. | `Enter` |
|
||||||
| Accept a suggestion while reverse searching. | `Tab` |
|
| `history.search.accept` | Accept a suggestion while reverse searching. | `Tab` |
|
||||||
|
|
||||||
#### Navigation
|
#### Navigation
|
||||||
|
|
||||||
| Action | Keys |
|
| Command | Action | Keys |
|
||||||
| -------------------------------------------------- | --------------- |
|
| --------------------- | -------------------------------------------------- | --------------- |
|
||||||
| Move selection up in lists. | `Up` |
|
| `nav.up` | Move selection up in lists. | `Up` |
|
||||||
| Move selection down in lists. | `Down` |
|
| `nav.down` | Move selection down in lists. | `Down` |
|
||||||
| Move up within dialog options. | `Up`<br />`K` |
|
| `nav.dialog.up` | Move up within dialog options. | `Up`<br />`K` |
|
||||||
| Move down within dialog options. | `Down`<br />`J` |
|
| `nav.dialog.down` | Move down within dialog options. | `Down`<br />`J` |
|
||||||
| Move to the next item or question in a dialog. | `Tab` |
|
| `nav.dialog.next` | Move to the next item or question in a dialog. | `Tab` |
|
||||||
| Move to the previous item or question in a dialog. | `Shift+Tab` |
|
| `nav.dialog.previous` | Move to the previous item or question in a dialog. | `Shift+Tab` |
|
||||||
|
|
||||||
#### Suggestions & Completions
|
#### Suggestions & Completions
|
||||||
|
|
||||||
| Action | Keys |
|
| Command | Action | Keys |
|
||||||
| --------------------------------------- | -------------------- |
|
| ----------------------- | --------------------------------------- | -------------------- |
|
||||||
| Accept the inline suggestion. | `Tab`<br />`Enter` |
|
| `suggest.accept` | Accept the inline suggestion. | `Tab`<br />`Enter` |
|
||||||
| Move to the previous completion option. | `Up`<br />`Ctrl+P` |
|
| `suggest.focusPrevious` | Move to the previous completion option. | `Up`<br />`Ctrl+P` |
|
||||||
| Move to the next completion option. | `Down`<br />`Ctrl+N` |
|
| `suggest.focusNext` | Move to the next completion option. | `Down`<br />`Ctrl+N` |
|
||||||
| Expand an inline suggestion. | `Right` |
|
| `suggest.expand` | Expand an inline suggestion. | `Right` |
|
||||||
| Collapse an inline suggestion. | `Left` |
|
| `suggest.collapse` | Collapse an inline suggestion. | `Left` |
|
||||||
|
|
||||||
#### Text Input
|
#### Text Input
|
||||||
|
|
||||||
| Action | Keys |
|
| Command | Action | Keys |
|
||||||
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
| -------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||||
| Submit the current prompt. | `Enter` |
|
| `input.submit` | Submit the current prompt. | `Enter` |
|
||||||
| Insert a newline without submitting. | `Ctrl+Enter`<br />`Cmd/Win+Enter`<br />`Alt+Enter`<br />`Shift+Enter`<br />`Ctrl+J` |
|
| `input.newline` | Insert a newline without submitting. | `Ctrl+Enter`<br />`Cmd/Win+Enter`<br />`Alt+Enter`<br />`Shift+Enter`<br />`Ctrl+J` |
|
||||||
| Open the current prompt or the plan in an external editor. | `Ctrl+X` |
|
| `input.openExternalEditor` | Open the current prompt or the plan in an external editor. | `Ctrl+X` |
|
||||||
| Paste from the clipboard. | `Ctrl+V`<br />`Cmd/Win+V`<br />`Alt+V` |
|
| `input.paste` | Paste from the clipboard. | `Ctrl+V`<br />`Cmd/Win+V`<br />`Alt+V` |
|
||||||
|
|
||||||
#### App Controls
|
#### App Controls
|
||||||
|
|
||||||
| Action | Keys |
|
| Command | Action | Keys |
|
||||||
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||||
| Toggle detailed error information. | `F12` |
|
| `app.showErrorDetails` | Toggle detailed error information. | `F12` |
|
||||||
| Toggle the full TODO list. | `Ctrl+T` |
|
| `app.showFullTodos` | Toggle the full TODO list. | `Ctrl+T` |
|
||||||
| Show IDE context details. | `Ctrl+G` |
|
| `app.showIdeContextDetail` | Show IDE context details. | `Ctrl+G` |
|
||||||
| Toggle Markdown rendering. | `Alt+M` |
|
| `app.toggleMarkdown` | Toggle Markdown rendering. | `Alt+M` |
|
||||||
| Toggle copy mode when in alternate buffer mode. | `Ctrl+S` |
|
| `app.toggleCopyMode` | Toggle copy mode when in alternate buffer mode. | `Ctrl+S` |
|
||||||
| Toggle YOLO (auto-approval) mode for tool calls. | `Ctrl+Y` |
|
| `app.toggleYolo` | Toggle YOLO (auto-approval) mode for tool calls. | `Ctrl+Y` |
|
||||||
| Cycle through approval modes: default (prompt), auto_edit (auto-approve edits), and plan (read-only). Plan mode is skipped when the agent is busy. | `Shift+Tab` |
|
| `app.cycleApprovalMode` | Cycle through approval modes: default (prompt), auto_edit (auto-approve edits), and plan (read-only). Plan mode is skipped when the agent is busy. | `Shift+Tab` |
|
||||||
| Expand and collapse blocks of content when not in alternate buffer mode. | `Ctrl+O` |
|
| `app.showMoreLines` | Expand and collapse blocks of content when not in alternate buffer mode. | `Ctrl+O` |
|
||||||
| Expand or collapse a paste placeholder when cursor is over placeholder. | `Ctrl+O` |
|
| `app.expandPaste` | Expand or collapse a paste placeholder when cursor is over placeholder. | `Ctrl+O` |
|
||||||
| Move focus from Gemini to the active shell. | `Tab` |
|
| `app.focusShellInput` | Move focus from Gemini to the active shell. | `Tab` |
|
||||||
| Move focus from the shell back to Gemini. | `Shift+Tab` |
|
| `app.unfocusShellInput` | Move focus from the shell back to Gemini. | `Shift+Tab` |
|
||||||
| Clear the terminal screen and redraw the UI. | `Ctrl+L` |
|
| `app.clearScreen` | Clear the terminal screen and redraw the UI. | `Ctrl+L` |
|
||||||
| Restart the application. | `R`<br />`Shift+R` |
|
| `app.restart` | Restart the application. | `R`<br />`Shift+R` |
|
||||||
| Suspend the CLI and move it to the background. | `Ctrl+Z` |
|
| `app.suspend` | Suspend the CLI and move it to the background. | `Ctrl+Z` |
|
||||||
| Show warning when trying to move focus away from shell input. | `Tab` |
|
| `app.showShellUnfocusWarning` | Show warning when trying to move focus away from shell input. | `Tab` |
|
||||||
|
|
||||||
#### Background Shell Controls
|
#### Background Shell Controls
|
||||||
|
|
||||||
| Action | Keys |
|
| Command | Action | Keys |
|
||||||
| ------------------------------------------------------------------ | ----------- |
|
| --------------------------- | ------------------------------------------------------------------ | ----------- |
|
||||||
| Dismiss background shell list. | `Esc` |
|
| `background.escape` | Dismiss background shell list. | `Esc` |
|
||||||
| Confirm selection in background shell list. | `Enter` |
|
| `background.select` | Confirm selection in background shell list. | `Enter` |
|
||||||
| Toggle current background shell visibility. | `Ctrl+B` |
|
| `background.toggle` | Toggle current background shell visibility. | `Ctrl+B` |
|
||||||
| Toggle background shell list. | `Ctrl+L` |
|
| `background.toggleList` | Toggle background shell list. | `Ctrl+L` |
|
||||||
| Kill the active background shell. | `Ctrl+K` |
|
| `background.kill` | Kill the active background shell. | `Ctrl+K` |
|
||||||
| Move focus from background shell to Gemini. | `Shift+Tab` |
|
| `background.unfocus` | Move focus from background shell to Gemini. | `Shift+Tab` |
|
||||||
| Move focus from background shell list to Gemini. | `Tab` |
|
| `background.unfocusList` | Move focus from background shell list to Gemini. | `Tab` |
|
||||||
| Show warning when trying to move focus away from background shell. | `Tab` |
|
| `background.unfocusWarning` | Show warning when trying to move focus away from background shell. | `Tab` |
|
||||||
|
|
||||||
<!-- KEYBINDINGS-AUTOGEN:END -->
|
<!-- KEYBINDINGS-AUTOGEN:END -->
|
||||||
|
|
||||||
|
## Customizing Keybindings
|
||||||
|
|
||||||
|
You can add alternative keybindings for commands by creating or modifying the
|
||||||
|
`keybindings.json` file in your home gemini directory (typically
|
||||||
|
`~/.gemini/keybindings.json`). This allows you to bind commands to additional
|
||||||
|
key combinations. Note that default keybindings cannot be removed.
|
||||||
|
|
||||||
|
### Configuration Format
|
||||||
|
|
||||||
|
The configuration uses a JSON array of objects, similar to VS Code's keybinding
|
||||||
|
schema. Each object must specify a `command` from the reference tables above and
|
||||||
|
a `key` combination.
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"command": "input.submit",
|
||||||
|
"key": "cmd+s"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "edit.clear",
|
||||||
|
"key": "ctrl+l"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Keyboard Rules
|
||||||
|
|
||||||
|
- **Explicit Modifiers**: Key matching is explicit. For example, a binding for
|
||||||
|
`ctrl+f` will only trigger on exactly `ctrl+f`, not `ctrl+shift+f` or
|
||||||
|
`alt+ctrl+f`. You must specify the exact modifier keys (`ctrl`, `shift`,
|
||||||
|
`alt`/`opt`/`option`, `cmd`/`meta`).
|
||||||
|
- **Literal Characters**: Terminals often translate complex key combinations
|
||||||
|
(especially on macOS with the `Option` key) into special characters. To handle
|
||||||
|
this reliably across all operating systems and SSH sessions, you can bind
|
||||||
|
directly to the literal character produced. For example, instead of trying to
|
||||||
|
bind `shift+5`, bind directly to `%`.
|
||||||
|
- **Special Keys**: Supported special keys include:
|
||||||
|
- **Navigation**: `up`, `down`, `left`, `right`, `home`, `end`, `pageup`,
|
||||||
|
`pagedown`
|
||||||
|
- **Actions**: `enter`, `escape`, `tab`, `space`, `backspace`, `delete`,
|
||||||
|
`clear`, `insert`, `printscreen`
|
||||||
|
- **Toggles**: `capslock`, `numlock`, `scrolllock`, `pausebreak`
|
||||||
|
- **Function Keys**: `f1` through `f35`
|
||||||
|
- **Numpad**: `numpad0` through `numpad9`, `numpad_add`, `numpad_subtract`,
|
||||||
|
`numpad_multiply`, `numpad_divide`, `numpad_decimal`, `numpad_separator`
|
||||||
|
|
||||||
## Additional context-specific shortcuts
|
## Additional context-specific shortcuts
|
||||||
|
|
||||||
- `Option+B/F/M` (macOS only): Are interpreted as `Cmd+B/F/M` even if your
|
- `Option+B/F/M` (macOS only): Are interpreted as `Cmd+B/F/M` even if your
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ export class KeyBinding {
|
|||||||
'insert',
|
'insert',
|
||||||
'numlock',
|
'numlock',
|
||||||
'scrolllock',
|
'scrolllock',
|
||||||
|
'printscreen',
|
||||||
'numpad_multiply',
|
'numpad_multiply',
|
||||||
'numpad_add',
|
'numpad_add',
|
||||||
'numpad_separator',
|
'numpad_separator',
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ const OUTPUT_RELATIVE_PATH = ['docs', 'reference', 'keyboard-shortcuts.md'];
|
|||||||
import { formatKeyBinding } from '../packages/cli/src/ui/key/keybindingUtils.js';
|
import { formatKeyBinding } from '../packages/cli/src/ui/key/keybindingUtils.js';
|
||||||
|
|
||||||
export interface KeybindingDocCommand {
|
export interface KeybindingDocCommand {
|
||||||
|
command: string;
|
||||||
description: string;
|
description: string;
|
||||||
bindings: readonly KeyBinding[];
|
bindings: readonly KeyBinding[];
|
||||||
}
|
}
|
||||||
@@ -81,6 +82,7 @@ export function buildDefaultDocSections(): readonly KeybindingDocSection[] {
|
|||||||
return commandCategories.map((category) => ({
|
return commandCategories.map((category) => ({
|
||||||
title: category.title,
|
title: category.title,
|
||||||
commands: category.commands.map((command) => ({
|
commands: category.commands.map((command) => ({
|
||||||
|
command: command,
|
||||||
description: commandDescriptions[command],
|
description: commandDescriptions[command],
|
||||||
bindings: defaultKeyBindingConfig.get(command) ?? [],
|
bindings: defaultKeyBindingConfig.get(command) ?? [],
|
||||||
})),
|
})),
|
||||||
@@ -94,14 +96,14 @@ export function renderDocumentation(
|
|||||||
const rows = section.commands.map((command) => {
|
const rows = section.commands.map((command) => {
|
||||||
const formattedBindings = formatBindings(command.bindings);
|
const formattedBindings = formatBindings(command.bindings);
|
||||||
const keysCell = formattedBindings.join('<br />');
|
const keysCell = formattedBindings.join('<br />');
|
||||||
return `| ${command.description} | ${keysCell} |`;
|
return `| \`${command.command}\` | ${command.description} | ${keysCell} |`;
|
||||||
});
|
});
|
||||||
|
|
||||||
return [
|
return [
|
||||||
`#### ${section.title}`,
|
`#### ${section.title}`,
|
||||||
'',
|
'',
|
||||||
'| Action | Keys |',
|
'| Command | Action | Keys |',
|
||||||
'| --- | --- |',
|
'| --- | --- | --- |',
|
||||||
...rows,
|
...rows,
|
||||||
].join('\n');
|
].join('\n');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
renderDocumentation,
|
renderDocumentation,
|
||||||
type KeybindingDocSection,
|
type KeybindingDocSection,
|
||||||
} from '../generate-keybindings-doc.ts';
|
} from '../generate-keybindings-doc.ts';
|
||||||
|
import { KeyBinding } from '../../packages/cli/src/ui/key/keyBindings.js';
|
||||||
|
|
||||||
describe('generate-keybindings-doc', () => {
|
describe('generate-keybindings-doc', () => {
|
||||||
it('keeps keyboard shortcut documentation in sync in check mode', async () => {
|
it('keeps keyboard shortcut documentation in sync in check mode', async () => {
|
||||||
@@ -31,12 +32,14 @@ describe('generate-keybindings-doc', () => {
|
|||||||
title: 'Custom Controls',
|
title: 'Custom Controls',
|
||||||
commands: [
|
commands: [
|
||||||
{
|
{
|
||||||
|
command: 'custom.trigger',
|
||||||
description: 'Trigger custom action.',
|
description: 'Trigger custom action.',
|
||||||
bindings: [{ key: 'x', ctrl: true }],
|
bindings: [new KeyBinding('ctrl+x')],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
command: 'custom.submit',
|
||||||
description: 'Submit with Enter if no modifiers are held.',
|
description: 'Submit with Enter if no modifiers are held.',
|
||||||
bindings: [{ key: 'enter', shift: false, ctrl: false }],
|
bindings: [new KeyBinding('enter')],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -44,11 +47,9 @@ describe('generate-keybindings-doc', () => {
|
|||||||
title: 'Navigation',
|
title: 'Navigation',
|
||||||
commands: [
|
commands: [
|
||||||
{
|
{
|
||||||
|
command: 'nav.up',
|
||||||
description: 'Move up through results.',
|
description: 'Move up through results.',
|
||||||
bindings: [
|
bindings: [new KeyBinding('up'), new KeyBinding('ctrl+p')],
|
||||||
{ key: 'up', shift: false },
|
|
||||||
{ key: 'p', shift: false, ctrl: true },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -56,11 +57,14 @@ describe('generate-keybindings-doc', () => {
|
|||||||
|
|
||||||
const markdown = renderDocumentation(sections);
|
const markdown = renderDocumentation(sections);
|
||||||
expect(markdown).toContain('#### Custom Controls');
|
expect(markdown).toContain('#### Custom Controls');
|
||||||
|
expect(markdown).toContain('`custom.trigger`');
|
||||||
expect(markdown).toContain('Trigger custom action.');
|
expect(markdown).toContain('Trigger custom action.');
|
||||||
expect(markdown).toContain('`Ctrl+X`');
|
expect(markdown).toContain('`Ctrl+X`');
|
||||||
|
expect(markdown).toContain('`custom.submit`');
|
||||||
expect(markdown).toContain('Submit with Enter if no modifiers are held.');
|
expect(markdown).toContain('Submit with Enter if no modifiers are held.');
|
||||||
expect(markdown).toContain('`Enter`');
|
expect(markdown).toContain('`Enter`');
|
||||||
expect(markdown).toContain('#### Navigation');
|
expect(markdown).toContain('#### Navigation');
|
||||||
|
expect(markdown).toContain('`nav.up`');
|
||||||
expect(markdown).toContain('Move up through results.');
|
expect(markdown).toContain('Move up through results.');
|
||||||
expect(markdown).toContain('`Up`<br />`Ctrl+P`');
|
expect(markdown).toContain('`Up`<br />`Ctrl+P`');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user