microsoft/Terminal

Add functionality to settings `Open JSON file` entry to open the settings.json parent folder in Explorer

Open

#12,382 opened on Feb 4, 2022

View on GitHub
 (16 comments) (0 reactions) (0 assignees)C++ (3,212 forks)batch import
Area-SettingsUIHelp WantedIssue-TaskProduct-Terminalgood first issue

Repository metrics

Stars
 (35,764 stars)
PR merge metrics
 (Avg merge 27d 19h) (24 merged PRs in 30d)

Description

Description of the new feature/enhancement

(this is a follow up to this issue #1460)

I have Windows Terminal latest stable, v1.12.10334.0 , on win11.

Currently, in the dropdown menu | 'Settings', there's an Open JSON file entry, clicking which opens the settings.json file only if the user has associated the .json file type with an installed editor, otherwise it shows the "Do you want to open this file?" windows dialog .

If you close the dialog, in order to manage to open the settings.json file manually, you'll have to look in the project wiki FAQ to find its location/path - there's no related info shown inside the app.

So, my suggestion is add functionality to "Open JSON file" settings entry to open the settings.json parent folder in Explorer.

Proposed technical implementation details (optional)

In details, my suggestion is, when clicking the Open JSON file entry, instead of attempting to open settings.json with the associated editor, to display a menu with two entries:

  • Open settings.json with associated editor
  • Open parent folder of settings.json in Explorer (in order to be able to open it manually).

  Or, alternatively/more simply, keep the current behavior (=attempt to open the file with the associated editor when leftclicking the "Open JSON file" entry), but when rightclicking it, to open its parent folder in file explorer (and update the entry tooltip respectively).

Contributor guide