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

Feature Request: Ability to clone current tab #2427

Closed
nicoabie opened this issue Aug 14, 2019 · 5 comments
Closed

Feature Request: Ability to clone current tab #2427

nicoabie opened this issue Aug 14, 2019 · 5 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@nicoabie
Copy link

Description of the new feature/enhancement

Ability to clone the current tab preserving the current directory

Proposed technical implementation details (optional)

@nicoabie nicoabie added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Aug 14, 2019
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 14, 2019
@zadjii-msft
Copy link
Member

This is a dupe of a bunch of related conversations:

#1756 (comment)

Just chiming in;

_ (profile,working dir, environment var, etc)._

Anything about the actual process on the other end is, in the general case, impossible to replicate. The connected process could be ssh.exe, whose environment variables and working directory have no bearing on the detectable environment and working directory from the terminal side. The same actually, weirdly enough, applies to WSL. It doesn't use "working directory" and it doesn't expose its environment variables to interested Windows processes in any way.

Powershell doesn't even set the current working directory, so its directory can't be detected (!) either.

#2315 (comment)

This is one of those things that is impossible in the general case but technically possible. There's a lot of intricacies here, like:

cmd
powershell
cd d:\users

well, powershell isn't the first process we launched. we'd ignore the path d:\users

(in powershell)
cd d:\users

we'd ignore d:\users because powershell doesn't actually set the current working directory (!!)

If your "shell" is ssh dustin@example.com (where we strictly define shell to be "the first process Terminal spawns on your behalf"), its working directory is always going to be C:\windows\system32 regardless of what the remote working directory is.

I'd rather not provide the feature than provide the feature with so many caveats that they'd fill a documentation page. ☹️ sorry.

#1536 (comment)

No, because that would likely be neigh impossible to do in a general sense. How would we duplicate an instance of vim for example? What if the foreground process has opened some sort of file for exclusive access - how could we duplicate that process?

If there's a way this can be done safely and generally I'm all ears for proposed technical solutions, but I don't think it's something that's possible, so I'm not going to be investigating it.


If this is generally technically possible, I'd love to implement it. But I'm/we're not sure that it'll work right in most scenarios, so I'd rather not add a feature that in the general case doesn't work the way you'd expect.

@zadjii-msft zadjii-msft added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Aug 14, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 14, 2019
@ghost
Copy link

ghost commented Aug 15, 2019

This issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes.

@ghost ghost closed this as completed Aug 15, 2019
@nicoabie
Copy link
Author

@zadjii-msft I'm not asking to clone a process the tab lauched.
It is a common use case to launch a terminal navigate to a directory and launch a few more.
That's what this feature request is asking, nothing else.

Can you reconsider opening this feature request again?

@zadjii-msft
Copy link
Member

I didn't close this based on the fact that it's impossible to clone a process's state generally - I closed it because it was a dupe of like 3 other feature requests. Also, we'd consider the path duplication if it was generally possible. Our current understanding is that we don't think that's possible - see my above comment, esp. the #1756 and #2315 comments on why we don't think that's possible.

@nicoabie
Copy link
Author

Got it, thanks @zadjii-msft

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants