Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open File from Integrated Terminal in Current Instance #118718

Closed
denisrheault opened this issue Mar 11, 2021 · 10 comments
Closed

Open File from Integrated Terminal in Current Instance #118718

denisrheault opened this issue Mar 11, 2021 · 10 comments
Assignees
Labels
feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label

Comments

@denisrheault
Copy link

denisrheault commented Mar 11, 2021

From the Integrated Terminal, one should be able to open a file from the command line in the current instance (when running multiple instances of vs code).

Currently the --reuse-window opens the file in the last active window but this is not the wanted behavior. The wanted behavior is much like when ctrl-clicking on a file in the integrated terminal; it opens in the current instance of code.

I have multiple instances of VS code running - one for each projects. Using --reuse-window opens the file in an instance of code that is not related to the project.

@vscodebot
Copy link

vscodebot bot commented Mar 11, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@denisrheault
Copy link
Author

denisrheault commented Mar 11, 2021 via email

@yume-chan
Copy link
Contributor

... should be able to open a file from the command line in the current instance
... --reuse-window opens the file in the last active window

How do you open a file from Integrated Terminal of an inactive window?

@denisrheault
Copy link
Author

denisrheault commented Mar 12, 2021 via email

@denisrheault
Copy link
Author

Any progress on this? Is it clear what I am asking for? Thanks in advance.

@meganrogge meganrogge added terminal General terminal issues that don't fall under another label feature-request Request for new features or functionality labels Mar 29, 2021
@Tyriar
Copy link
Member

Tyriar commented Mar 30, 2021

Can you elaborate a little on what you mean here? If you open a file from the CLI, it will open it in the most relevant windows AFAICT. See this gif how I open xterm.js/README.md from the vscode window, but it opens in the correct window:

recording (17)

@Tyriar Tyriar added info-needed Issue requires more information from poster and removed feature-request Request for new features or functionality labels Mar 30, 2021
@Tyriar Tyriar self-assigned this Mar 30, 2021
@Tyriar Tyriar removed this from the Backlog Candidates milestone Mar 30, 2021
@denisrheault
Copy link
Author

Hi Tyriar,

From the CLI, I want the same behavior as when clicking "Open File in Editor (ctrl + click)"; the file opens in the current window (same as the integrated terminal).

I realized while trying to replicate to make a GIF is that the behavior is as expected as long as I don't SSH into another server.

Without SSH'ing, it actually works as expected, as shown in this GIF. In the GIF I show that in the integrated terminal I can hover a filename (xrun.log) and ctrl-click'ing opens the file in the current window.
vsCode_CLI_ok

I repeated the same thing, first showing that 'code ./xrun.log' still opens the file in the current window, next SSH into another server and opens the same file (it's a shared drive therefore file exists on both servers).
Unexpectedly another Window opens xrun.log. Now let's try hovering on the filename and ctrl-click'ing opens the file in the current window as expected.

vsCode_CLI_NOTok

Now that I understand that the problem is with SSH and not being able to open a file in a window (process) that is running on a different machine.
I don't think there's anything that could be done in this case. Let me know what you think.
Thanks!

@meganrogge meganrogge added feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Apr 22, 2021
@aeschli
Copy link
Contributor

aeschli commented Apr 23, 2021

It's a regression that was caused by moving the terminal process under the main process:
Duplicate of #121926

@aeschli aeschli closed this as completed Apr 23, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

6 participants
@yume-chan @Tyriar @aeschli @meganrogge @denisrheault and others