Skip to content

Commit 523478e

Browse files
committed
Adds "Open in Integrated Terminal" to worktrees
- Allows opening a worktree's folder in the integrated terminal from both the Commit Graph and Worktrees views - Preserves remote development URI schemes (e.g., SSH, WSL) instead of falling back to flat local file paths - Standardizes view terminal commands by renaming the command to `gitlens.openInIntegratedTerminal:views` Closes #5386
1 parent 52613e9 commit 523478e

6 files changed

Lines changed: 457 additions & 424 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1313
- Adds the ability to stash or copy a patch of only the selected files from the working tree (WIP) file list in the _Inspect_ and _Commit Graph_ views — selecting 2+ files retargets the _Stash_ and _Copy (Patch)_ toolbar buttons to the selection, with the whole-scope action available by holding Alt, plus a matching multi-select _Copy Changes (Patch)_ context menu command ([#5384](https://github.com/gitkraken/vscode-gitlens/issues/5384))
1414
- Adds _Open Changes_, _Open Staged Changes_, and _Open Unstaged Changes_ options for working tree files that have both staged and unstaged changes in the _Inspect_ and _Commit Graph_ views — a partially-staged file appears as a single row but you can now open its staged-only, unstaged-only, or combined diff from the context menu ([#5385](https://github.com/gitkraken/vscode-gitlens/issues/5385))
1515
- Adds a working tree change count badge to the _Commit Graph_ view — mirrors the _Source Control_ view by showing the number of working tree changes on the GitLens panel tab, even while the panel is collapsed; controllable via the new `gitlens.graph.showWorkingTreeBadge` setting ([#5383](https://github.com/gitkraken/vscode-gitlens/issues/5383))
16+
- Adds an _Open in Integrated Terminal_ option for worktrees in the _Commit Graph_ and the _Worktrees_ view — opens the selected worktree's folder in the integrated terminal, matching the action already available for repositories and folders ([#5386](https://github.com/gitkraken/vscode-gitlens/issues/5386))
1617

1718
### Changed
1819

contributions.json

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4938,6 +4938,38 @@
49384938
"when": "webviewItem =~ /^gitlens:wip\\b/ && !listMultiSelection && !gitlens:hasVirtualFolders",
49394939
"group": "0_gitlens_worktree_1",
49404940
"order": 2
4941+
},
4942+
{
4943+
"when": "webviewItem =~ /gitlens:worktree\\b/ && !listMultiSelection && !gitlens:hasVirtualFolders",
4944+
"group": "0_gitlens_worktree_1",
4945+
"order": 2
4946+
}
4947+
]
4948+
}
4949+
},
4950+
"gitlens.openInIntegratedTerminal:views": {
4951+
"label": "Open in Integrated Terminal",
4952+
"menus": {
4953+
"view/item/context": [
4954+
{
4955+
"when": "viewItem =~ /gitlens:repo-folder\\b/ && !listMultiSelection && !gitlens:hasVirtualFolders",
4956+
"group": "2_gitlens_quickopen",
4957+
"order": 2
4958+
},
4959+
{
4960+
"when": "viewItem =~ /gitlens:repository\\b/ && !listMultiSelection && !gitlens:hasVirtualFolders",
4961+
"group": "2_gitlens_quickopen",
4962+
"order": 2
4963+
},
4964+
{
4965+
"when": "viewItem =~ /gitlens:status:upstream\\b/ && !listMultiSelection && !gitlens:hasVirtualFolders",
4966+
"group": "2_gitlens_quickopen_terminal",
4967+
"order": 2
4968+
},
4969+
{
4970+
"when": "viewItem =~ /gitlens:worktree\\b/ && !listMultiSelection && !gitlens:hasVirtualFolders",
4971+
"group": "0_gitlens_worktree_1",
4972+
"order": 2
49414973
}
49424974
]
49434975
}
@@ -12971,28 +13003,6 @@
1297113003
]
1297213004
}
1297313005
},
12974-
"gitlens.views.openInIntegratedTerminal": {
12975-
"label": "Open in Integrated Terminal",
12976-
"menus": {
12977-
"view/item/context": [
12978-
{
12979-
"when": "viewItem =~ /gitlens:repo-folder\\b/ && !listMultiSelection && !gitlens:hasVirtualFolders",
12980-
"group": "2_gitlens_quickopen",
12981-
"order": 2
12982-
},
12983-
{
12984-
"when": "viewItem =~ /gitlens:repository\\b/ && !listMultiSelection && !gitlens:hasVirtualFolders",
12985-
"group": "2_gitlens_quickopen",
12986-
"order": 2
12987-
},
12988-
{
12989-
"when": "viewItem =~ /gitlens:status:upstream\\b/ && !listMultiSelection && !gitlens:hasVirtualFolders",
12990-
"group": "2_gitlens_quickopen_terminal",
12991-
"order": 2
12992-
}
12993-
]
12994-
}
12995-
},
1299613006
"gitlens.views.openInTerminal": {
1299713007
"label": "Open in Terminal",
1299813008
"menus": {

0 commit comments

Comments
 (0)