Duplicate terminal session #9555

Closed
opened 2026-01-31 01:57:40 +00:00 by claunia · 3 comments
Owner

Originally created by @maifeeulasad on GitHub (Jul 11, 2020).

Description of the new feature/enhancement

Duplicate a session

Proposed technical implementation details (optional)

There should be options to open at least the same directory in new tab. Like GNOME in Linux has CTRL + SHIFT + T, CTRL + SHIFT + N.

But when we are discussing about session, it should be more than opening in a specific directory.

Image we are working on CMD and a system variable is added, will the CMD knows about it? No.
If I have added a path. And I ask for that path in that CMD, will CMD be able to provide me with that. Now if I open up a new CMD, I will be able to access that path. So if we want to implement session, like we have a new key-set CTRL + SHIFT + D, we have to create another layer, where the CLI will be held. The top layer will just be view.

Originally created by @maifeeulasad on GitHub (Jul 11, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Duplicate a session <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) There should be options to open at least the same directory in new tab. Like GNOME in Linux has `CTRL + SHIFT + T`, `CTRL + SHIFT + N`. But when we are discussing about session, it should be more than opening in a specific directory. Image we are working on CMD and a system variable is added, will the CMD knows about it? No. If I have added a path. And I ask for that path in that CMD, will CMD be able to provide me with that. Now if I open up a new CMD, I will be able to access that path. So if we want to implement session, like we have a new key-set `CTRL + SHIFT + D`, we have to create another layer, where the CLI will be held. The top layer will just be view. <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-FixProduct-Terminal labels 2026-01-31 01:57:40 +00:00
Author
Owner

@j4james commented on GitHub (Jul 11, 2020):

Opening a new tab in the same directory is #3158.

If you're expecting the new tab to also inherit environment variables from the current tab, I suspect that's not possible. Do you know of a Linux terminal that can do that?

@j4james commented on GitHub (Jul 11, 2020): Opening a new tab in the same directory is #3158. If you're expecting the new tab to also inherit environment variables from the current tab, I suspect that's not possible. Do you know of a Linux terminal that can do that?
Author
Owner

@maifeeulasad commented on GitHub (Jul 12, 2020):

@j4james I don't if any thing exists like this till now.
But maybe this this is possible.
I'll try to implement it on a small scale, and get back here as soon as possible.
Thanks.

@maifeeulasad commented on GitHub (Jul 12, 2020): @j4james I don't if any thing exists like this till now. But maybe this this is possible. I'll try to implement it on a small scale, and get back here as soon as possible. Thanks.
Author
Owner

@zadjii-msft commented on GitHub (Jul 13, 2020):

So I know that "restore session" is technically different, but it's got a lot of the same requirements as "duplicate session". I've discussed this more over in https://github.com/microsoft/terminal/issues/960#issuecomment-495355057 and linked threads. While restoring we might be able to get away with by hanging on to old sessions, duplicating the sessions would be generally impossible.

Let's also link up other relevant discussions:

  • Feature Request - Restore closed tab #960
  • Restore previously closed session's state #961

I'm going to close this because I believe that it's not possible in the general sense, and that #3158 is going to cover the 99% use case (if that's even possible for us). Feel free to continue the discussion however and prove me wrong ☺️

@zadjii-msft commented on GitHub (Jul 13, 2020): So I know that "restore session" is _technically_ different, but it's got a lot of the same requirements as "duplicate session". I've discussed this more over in https://github.com/microsoft/terminal/issues/960#issuecomment-495355057 and linked threads. While restoring we might be able to get away with by hanging on to old sessions, duplicating the sessions would be generally impossible. Let's also link up other relevant discussions: * Feature Request - Restore closed tab #960 * Restore previously closed session's state #961 I'm going to close this because I believe that it's not possible in the general sense, and that #3158 is going to cover the 99% use case (if that's even possible for us). Feel free to continue the discussion however and prove me wrong ☺️
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9555