Skip to content

Starting directory no longer respected #878

@nphmuller

Description

@nphmuller

Commit where this occurs: e0f131121b08dc5d6485e4bd985ac2c7e32b6339
Commit where this didn't occur yet: d5b8e7c32f7a419a7d467eab038251ee529056e6

Since the startingDirectory profiles.json setting was introduced (which is set to %USERPROFILE% by default), the current starting directory is no longer respected and the terminal always starts in %USERPROFILE%.

The startingDirectory setting is great to make sure the terminal doesn't always start in c:\windows\system32. It might however be better that its not used when starting Windows Terminal from a folder.

With starting WT from a folder I mean launching wt.exe (or wtd.exe) from an open cmd, or in Windows Explorer via its address bar.

The folder of the parent cmd process (or Explorer process) should then be used by default and startingDirectory should be used as a fallback. For example, when launching Windows Terminal from the start menu.

Steps to reproduce

  • Make sure startingDirectory is set to %USERPROFILE%:
{
	...
	"profiles": [{
			"startingDirectory": "%USERPROFILE%",
		}, {
		...
		}
	],
	...
}
  • Open an explorer window in a random folder (for example the root of the C drive)
  • Type wt (or wtd) in the address bard

Expected behavior

Windows Terminal should open with the terminals path set to the folder opened in explorer. In the example this would be the root of the C drive: C:\.

Actual behavior

Windows Terminal opens with the terminals path set to the user profile path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-SettingsIssues related to settings and customizability, for console or terminalIssue-BugIt either shouldn't be doing this or needs an investigation.Product-TerminalThe new Windows Terminal.Resolution-Won't-FixWe're just really obstinate about this. There's probably a good reason.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions