restore-terminals-vscode
restore-terminals-vscode copied to clipboard
Add `cwd` terminal configuration option
This fixes #4, as it allows users to specify the folder that they want each terminal to start in (cwd) and it will override terminal.integrated.splitCwd temporarily when creating splits so that the user isn't prompted which stops terminals from being created.
Looks good! Could you also please update the package.json configuration properties accordingly. Thanks
Could you please describe the problem better? Why can't the user just cd to the right directory in the commands array themselves?
Could you please describe the problem better? Why can't the user just cd to the right directory in the commands array themselves?
People can cd to the right directory in the commands array, but if you have shouldRunCommands set to false, I think the cd command should still be executed. Another issue that my PR works around is that, if you have terminal.integrated.splitCwd set to workspaceRoot, if you're in a multi-root workspace every time you try to create a terminal split it'll prompt the user what folder to start that terminal in which stops the extension from creating terminals.
I made this PR because it would be nice to just directly use the cwd parameter of vscode.window.createTerminal which means the terminal is just started in the correct directory. But I didn't want the PR to be limited to only the first terminal being set to a cwd so I made it use a workaround by manually executing cd for the user, in the hopes that one day VS Code will release a proper API for creating terminal splits where you can specify the cwd.
Ok cool, makes sense. Could you first address the other comments i've left (just unhidden them), then I can merge
@EthanSK OK?
@EthanSK can this be merged soon please ? Very useful.
@EthanSK bump
Is this PR still being considered?
Just another voice wondering if this PR will be considered. Very useful feature.
Bump?