Skip to content

Consider changing how git command terminals are created #1450

@Tyriar

Description

@Tyriar

I noticed that gitlens created a terminal for me just now:

Screen Shot 2021-03-31 at 5 08 07 AM

After it completed I continued on using the terminal like normal but later realized the title was set to Gitlens which can't be changed.

I was thinking a better way to approach this might be to do something like this:

window.createTerminal({
  name: "GitLens", // + " (revert)"?
  cwd: "/Users/daimms/dev/microsoft/vscode",
  shellPath: "bash",
  shellArgs: ["-c", `git revert ${hash}`]
});

That way the terminal would be short lived only for this action, it would close immediately after running the command right now but if you think this is a good idea and would adopt we can look into adding waitOnExit to the API: microsoft/vscode#70444

I think another option is for the extension to contribute tasks and run them which already leverage waitOnExit internally and should reuse the terminal.

Metadata

Metadata

Assignees

Labels

under-discussionBeing considered or is under active discussion

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions