Add terminal.newHere command#79863
Conversation
Tyriar
left a comment
There was a problem hiding this comment.
Instead of a new command, workbench.action.terminal.new should accept an optional arg cwd so keybindings can be setup for different cwds
|
@Tyriar I looked into that at first but vscode/src/vs/workbench/common/actions.ts Lines 114 to 117 in a269614 also when creating actions, it doesn't seem to be a way to specify the args schema like this Should this PR contain changes to allow actions with generic arguments? |
|
Can |
|
Not sure about that, it needs to be an action because it's used in |
|
Good point, can we do what |
|
Are you referring to the parameter export class PreviousSideBarViewAction extends SwitchSideBarViewAction {
...
run(): Promise<any> {
return super.run(-1);
}
}
export class NextSideBarViewAction extends SwitchSideBarViewAction {
...
run(): Promise<any> {
return super.run(1);
}
} |
Tyriar
left a comment
There was a problem hiding this comment.
@jeanp413 thanks for your patience, I tried to do what i was thinking and it ended up not working out. I changed the name of the setting to newWithCwd and also for the actual cwd to be wrapped in an object and gave it a description:
Here's an example of a keybinding now:
{
"key": "cmd+shift+h",
"command": "workbench.action.terminal.newWithCwd",
"args": {
"cwd": "${fileDirname}"
}
}

Fixes #79133
Let me know if there's some missing validation for the
cwdcommand argument.