forked from google-gemini/gemini-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
feat(cli): Add direct shell command execution with Ctrl/Meta+Enter #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
var-aha
wants to merge
30
commits into
main
Choose a base branch
from
feature/quick-command-exec
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cf739ea to
dc7e123
Compare
Add ability to execute shell commands directly from prompt mode using Ctrl+Enter (or Meta+Enter on Mac) without switching to shell mode. Updated documentation: - Added keyboard shortcut reference - Updated commands documentation with usage examples - Updated help text with new shortcut
dc7e123 to
6237d36
Compare
Resolved merge conflicts in: - docs/cli/keyboard-shortcuts.md: Combined Meta+Enter editor shortcut with new undo/redo shortcuts - packages/cli/src/ui/AppContainer.tsx: Integrated quick command cancellation with new Ctrl+C press count system and ExtensionManager refactoring Also fixed ESLint warning by adding buffer to useCallback dependencies.
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
Co-authored-by: LayorX <yor31117@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…it/gemini ignore config. (google-gemini#10073) Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TLDR
Adds keyboard shortcuts (
Meta+Enteron macOS,Ctrl+Enteron all platforms) to execute shell commands directly from the input prompt without entering shell mode.Dive Deeper
Previously, users who wanted to run a shell command had to either:
!, execute the command, then toggle backThis change adds a third option: pressing
Meta+Enter(macOS) orCtrl+Enter(all platforms) executes the current input text as a shell command without switching modes.Implementation details:
EXECUTE_PROMPT_COMMANDto the command enum in key bindingsMeta+Enter(macOS) andCtrl+Enter(all platforms)handleShellCommandinfrastructure from shell modeReviewer Test Plan
ls -la)Meta+Enter(macOS) orCtrl+Enter(other platforms)Ctrl+Enteron macOS as well. If that doesn't work, tryOption+Enter(since some terminals report Option as Meta instead of Cmd)Ctrl+CTesting Matrix
Linked issues / bugs
Fixes google-gemini#10130