Skip to content

Terminal: Run Recent Command shows up when there are no terminals #233604

Closed
@Tyriar

Description

@Tyriar
Member

Repro:

  1. Close all terminals
  2. Run the command, 🐛 nothing happens

Image

We should either hide it or implement it when there isn't a terminal.

Activity

added
bugIssue identified by VS Code Team member as probable bug
help wantedIssues identified as good community contribution opportunities
terminal-shell-integrationShell integration infrastructure, command decorations, etc.
on Nov 11, 2024
added this to the Backlog milestone on Nov 11, 2024
self-assigned this
on Nov 11, 2024
SalerSimo

SalerSimo commented on Nov 18, 2024

@SalerSimo

@Tyriar can i help with this issue?

Tyriar

Tyriar commented on Nov 18, 2024

@Tyriar
MemberAuthor

@SalerSimo sure! Here's a code pointer:

run: async (activeInstance, c) => {
const history = TerminalHistoryContribution.get(activeInstance);
if (!history) {
return;
}
await history.runRecent('command');
if (activeInstance?.target === TerminalLocation.Editor) {
await c.editorService.revealActiveEditor();
} else {
await c.groupService.showPanel(false);
}
}

SalerSimo

SalerSimo commented on Nov 21, 2024

@SalerSimo

@Tyriar I opened a PR for this, can you tell me if the code I wrote is fine? I'm not sure if using a sleep function is accepted here, and, if it's not, I think that the only solution for this issue would be hiding the "Run Recent Command" command when there are no open terminals.

Sublimeful

Sublimeful commented on Jun 6, 2025

@Sublimeful
Contributor

@Tyriar Since there has been no recent activity on this issue, I have created a PR that addresses this. If you have time, please take a look at the PR and let me know if you have any questions!

modified the milestones: Backlog, June 2025 on Jun 6, 2025

2 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code Insidersterminal-shell-integrationShell integration infrastructure, command decorations, etc.

Type

No type

Projects

No projects

Relationships

None yet

    Participants

    @Tyriar@Sublimeful@SalerSimo

    Issue actions

      Terminal: Run Recent Command shows up when there are no terminals · Issue #233604 · microsoft/vscode