Vscode: "Open in Terminal" is not multiselect-aware

Created on 30 Jan 2018  路  11Comments  路  Source: microsoft/vscode

Testing https://github.com/Microsoft/vscode/issues/41473 on Linux

  • Select multiple things in the file explorer
  • Right click, "Open in Terminal"
  • Only opens one terminal, corresponding to whichever item was actually right clicked

I think it makes sense for multiselect because it's similar to "open containing folder"

feature-request good first issue help wanted integrated-terminal release-notes verification-found verification-needed verified

All 11 comments

The current behavior is decent.
This feature request might be nice to have. I leave this up to daniel to decide
Code pointer https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts#L87
Just use getResourcesForCommand instead

I think the current behavior is fine for me, but if someone has selected multiple items they clearly have intent. Opening this up to PRs

I would like to have a go at this if its fine.

I have a question with respect to implementation. Say two files(or folder) selected are from same folder, should we still open two instances in the terminal ? Or should we check to ensure that same folder isnt duplicated ?

I can verify that it's not working on MacOS as well. My 2 cents-

  1. I think it makes sense to have multiple terminals for multiple item selection.
  2. @sriram-dev It makes sense to have multiple terminals for multi-folder selection, but for files within the same <root> folder, it makes sense to have only one terminal with the <root>folder.

Details -

  • VSCode Version: 1.20.0-insider (1.20.0-insider) (3f8cf)
  • OS Version: High Sierra 10.13.2

@sriram-dev by all means :smiley:

I think only opening a terminal for each once would probably be best personally.

Does not work for me:
flicker_chrome58

This is expected behavior. Only if they have different folder multiple terminals will get opened. Please try with files in different folders. Thanks

@isidorn I see. Seems to work nicely. I still think if the selection is all from the same root you could just reveal that parent in the terminal. Not doing anything is weird, especially since the action is not disabled.

Oh I misunderstood your original comment. Yes if they all have the same parent it should open. Pushed a fix now. Thanks

Was this page helpful?
0 / 5 - 0 ratings