Add "Open External Terminal" action (like VS Code's Ctrl+Shift+C) #53846
oxijoined
started this conversation in
Feature Requests
Replies: 1 comment
-
|
Duplicate of #7974 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What are you proposing?
A new native action
workspace::OpenExternalTerminalthat opens the user's preferred external terminal application in the current project's working directory.This is equivalent to VS Code's
workbench.action.terminal.openNativeConsole(Ctrl+Shift+C).The action would be bindable in keymap like any other action:
{ "context": "Workspace", "bindings": { "ctrl-shift-c": "workspace::OpenExternalTerminal" } } Why does this matter? Many workflows require a full-featured external terminal window — running Docker, using tmux sessions, debugging with specialized TUI tools, or simply preferring a specific terminal emulator over the built-in one. Currently the only workaround is a verbose task::Spawn hack: // keymap "ctrl-shift-c": ["task::Spawn", { "task_name": "Open PowerShell here" }] // tasks.json { "label": "Open PowerShell here", "command": "pwsh", "args": ["-Command", "Start-Process pwsh -ArgumentList '-NoExit','-Command','Set-Location \"$ZED_WORKTREE_ROOT\"'"], "reveal": "never", "hide": "always" } This is fragile, platform-specific, non-discoverable, and requires users to maintain task definitions just to open a terminal. A native action would make this a one-line keymap binding. Are there any examples or context? VS Code has this as a built-in feature since its early versions: - Command: workbench.action.terminal.openNativeConsole - Default binding: Ctrl+Shift+C (Windows/Linux), ⇧⌘C (macOS) - Configurable via terminal.external.windowsExec, terminal.external.osxExec, terminal.external.linuxExec - Opens at workspace root directory JetBrains IDEs also have "Open in Terminal" that launches an external terminal. Possible approach - Add a new action workspace::OpenExternalTerminal in the workspace crate - Add a terminal settings field for the external terminal executable (per-platform defaults: cmd.exe/powershell on Windows, Terminal.app on macOS, x-terminal-emulator or xterm on Linux) - The action spawns the configured terminal as a detached process with cwd set to the project's worktree root - No default keybinding (users bind it themselves), or a default matching VS Code's convention - Setting is user-level only (not project-level) for security — prevents malicious projects from specifying arbitrary executablesBeta Was this translation helpful? Give feedback.
All reactions