Terminal: Typing "wt" in File Explorer's address bar (while browsing a file folder) opens Terminal but does not browse the current folder. CMD works.

Created on 19 Feb 2020  路  8Comments  路  Source: microsoft/terminal

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.84]
Windows Terminal version (if applicable): 0.9.433.0 (but N/A)

Steps to reproduce

Typing "wt" in File Explorer's address bar (while browsing a file folder) opens Terminal but does not browse the current folder. CMD works.

image
Click in the address bar in Explorer, type wt and press enter. This works with cmd, not with wt.

image

Expected behavior

I'd expect wt to imply -d in this context and work the same way cmd does.

Actual behavior

Terminal just opens at the default starting directory.

Resolution-Duplicate

Most helpful comment

TL, DR;

Go to the settings of wt, add one line like the following:

            {
                "guid": "{...}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore",
                "startingDirectory": "./"
            },

All 8 comments

@shanselman I think this was discussed here: https://github.com/microsoft/terminal/issues/620

@carlinmack I don't think that's entirely necessary.

  • If you launch wt from the Windows Explorer address bar, or via something like cmd.exe (or another shell) navigated to a certain folder, then the "startingDirectory": "." will ensure that Windows Terminal opens in the directory you were in.

Maybe you can look at https://gist.github.com/akunzai/b4b1f394db3ceb399ba1976a30e540fa#file-profiles-json-L9
It worked for me.

@shanselman there's like so much discussion on this in /dupe #878, please search before filing new issues 馃槣

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!

Sorry for that. I just think that https://github.com/microsoft/terminal/issues/878#issuecomment-579508860 isn't really an acceptable answer. :(

So, @zadjii-msft this worked for me https://github.com/microsoft/terminal/issues/4647#issuecomment-588354967 why don't we promote/do that?

@shanselman Because if you do that, then launching the Terminal from the Start Menu starts up in C:\Windows\System32. There's no way to have the app launch in a reasonable starting directory from both the Start Menu and also from the address bar of explorer.exe

I literally just launched wt from Win+R just now and it shows up in C:\Users\scott

TL, DR;

Go to the settings of wt, add one line like the following:

            {
                "guid": "{...}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore",
                "startingDirectory": "./"
            },
Was this page helpful?
0 / 5 - 0 ratings

Related issues

alabuzhev picture alabuzhev  路  3Comments

NickITGuy picture NickITGuy  路  3Comments

mdtauk picture mdtauk  路  3Comments

Wid-Mimosa picture Wid-Mimosa  路  3Comments

zadjii-msft picture zadjii-msft  路  3Comments