how to specify startingdirectory when terminal launch? #11313

Closed
opened 2026-01-31 02:44:12 +00:00 by claunia · 5 comments
Owner

Originally created by @candrewtemenoscom on GitHub (Nov 7, 2020).

I tried to specifying it in startingdirectory in setting.json. But it does not work. I would like to set the directory when I launch the terminal.

Originally created by @candrewtemenoscom on GitHub (Nov 7, 2020). I tried to specifying it in startingdirectory in setting.json. But it does not work. I would like to set the directory when I launch the terminal.
Author
Owner

@LuanVSO commented on GitHub (Nov 7, 2020):

how does it not work?
mind sharing your settings.json?

@LuanVSO commented on GitHub (Nov 7, 2020): how does it not work? mind sharing your settings.json?
Author
Owner
@ghost commented on GitHub (Nov 8, 2020): https://docs.microsoft.com/windows/terminal/customize-settings/profile-settings#starting-directory
Author
Owner

@zadjii-msft commented on GitHub (Nov 8, 2020):

Yea you gotta give us some more info. What have you set it to? What's the commandline you're using? By any chance, are you using a WSL distro (which might make this #7197)?

@zadjii-msft commented on GitHub (Nov 8, 2020): Yea you gotta give us some more info. What have you set it to? What's the `commandline` you're using? By any chance, are you using a WSL distro (which might make this #7197)?
Author
Owner

@candrewtemenoscom commented on GitHub (Nov 9, 2020):

It is working now. I put the startingdirectory property in the wrong section. Now I moved it to the default profile. Thanks for the quick response and the pointers.

A quick suggestion. I find that sometimes it is not easy to know where to set the property and its value especially when there are multiple nested properties. I find that the swagger doc for setting properties in its json file quite intuitive in which it pre-specify (but commented out) all the optional property and users can choose to enable it by uncommenting out the property. It prevents making mistakes.

@candrewtemenoscom commented on GitHub (Nov 9, 2020): It is working now. I put the startingdirectory property in the wrong section. Now I moved it to the default profile. Thanks for the quick response and the pointers. A quick suggestion. I find that sometimes it is not easy to know where to set the property and its value especially when there are multiple nested properties. I find that the swagger doc for setting properties in its json file quite intuitive in which it pre-specify (but commented out) all the optional property and users can choose to enable it by uncommenting out the property. It prevents making mistakes.
Author
Owner

@zadjii-msft commented on GitHub (Nov 10, 2020):

I'm glad you were able to figure it out!

We actually previously would include all the possible properties in the settings file, but it turned out to be much to unwieldy. There's just a lot of settings, and it largely made the file harder to read. Hopefully this won't be much of an issue when the settings UI ships (soonTM)

@zadjii-msft commented on GitHub (Nov 10, 2020): I'm glad you were able to figure it out! We actually previously would include all the possible properties in the settings file, but it turned out to be much to unwieldy. There's just a lot of settings, and it largely made the file harder to read. Hopefully this won't be much of an issue when the settings UI ships (soon<sup>TM</sup>)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11313