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

keep the same path after switching from powershell to command prompt #11774

Closed
ghost opened this issue Nov 17, 2021 · 7 comments
Closed

keep the same path after switching from powershell to command prompt #11774

ghost opened this issue Nov 17, 2021 · 7 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@ghost
Copy link

ghost commented Nov 17, 2021

Description of the new feature/enhancement

Proposed technical implementation details (optional)

When I open PowerShell by right-clicking in a folder, it opens in that path, but then when i switch to Command Prompt, it starts from User folder.

I want Windows Terminal to keep the same path after opening Command Prompt or other terminals from the tabs and not switch to their default path. so if i'm working with PowerShell in a specific directory and then open CMD from the same Terminal window, I want PowerShell to pass the current working directory to the CMD.

at least provide this as an option in Windows Terminal settings.

I'm using Windows 11 insider beta and the built-in Windows Terminal

Thanks

@ghost ghost added 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 Needs-Tag-Fix Doesn't match tag requirements labels Nov 17, 2021
@aungthanlwin
Copy link

aungthanlwin commented Nov 17, 2021

There is a workaround for this. You can use the -d option and "." (dot) notation to pass the current working directory to command prompt. For example, when you're in windows powershell, you can start command prompt with the command “wt -w 0 -p “Command Prompt” -d .” or "start cmd ."

@jthoward64
Copy link

There is a workaround for this. You can use the -d option and "." (dot) notation to pass the current working directory to command prompt. For example, when you're in windows powershell, you can start command prompt with the command “wt -w 0 -p “Command Prompt” -d .” or "start cmd ."

I think OP is referring to opening new profiles after running windows terminal from file explorer's context menu

@zadjii-msft
Copy link
Member

Okay, so lemme get this stright

  1. You right click in explorer (in c:\foo), and "open Windows Terminal here"
  2. You get a PowerShell tab in c:\foo
  3. You open a new Command Prompt tab, via the new tab menu or the command palette or whatever
  4. it opens in whatever cmd.exe's startingDirectory is set to

and you want step 4 to open in c:\foo. Originally, I thought we were tracking this in #8933, but that only applied when the startingDirectory is set to ..

Now, I think you're going to have to do the OSC9;9 thing to emit the working directory, and then wait for #10232 to allow opening a tab/pane with the same directory, but a different profile.

Do I have that right? If so, I'm gonna call this one a duplicate of #10232.

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Nov 23, 2021
@ghost
Copy link
Author

ghost commented Nov 24, 2021

Okay, so lemme get this stright

  1. You right click in explorer (in c:\foo), and "open Windows Terminal here"
  2. You get a PowerShell tab in c:\foo
  3. You open a new Command Prompt tab, via the new tab menu or the command palette or whatever
  4. it opens in whatever cmd.exe's startingDirectory is set to

and you want step 4 to open in c:\foo. Originally, I thought we were tracking this in #8933, but that only applied when the startingDirectory is set to ..

Now, I think you're going to have to do the OSC9;9 thing to emit the working directory, and then wait for #10232 to allow opening a tab/pane with the same directory, but a different profile.

Do I have that right? If so, I'm gonna call this one a duplicate of #10232.

Yes you got it right, I want it exactly like that.
thank you

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Nov 24, 2021
@zadjii-msft
Copy link
Member

Awesome, thanks!

/dup #10232

@ghost
Copy link

ghost commented Nov 24, 2021

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Nov 24, 2021
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed 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 Needs-Attention The core contributors need to come back around and look at this ASAP. labels Nov 24, 2021
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. 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

3 participants