-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add action for opening settings directory in file explorer #17690
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -328,6 +328,15 @@ | |||||
<value>Open settings file (JSON)</value> | ||||||
<comment>{Locked="JSON"}. "JSON" is the extension of the file that will be opened.</comment> | ||||||
</data> | ||||||
<data name="SettingFilePathSendInputCommandKey" xml:space="preserve"> | ||||||
<value>Send the settings file path as input to the terminal</value> | ||||||
</data> | ||||||
<data name="SettingsFileOpenInExplorerCommandKey" xml:space="preserve"> | ||||||
<value>Open the settings file directory in File Explorer</value> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
</data> | ||||||
<data name="SettingsFilePathSendToClipboard" xml:space="preserve"> | ||||||
<value>Send settings file path to clipboard</value> | ||||||
</data> | ||||||
<data name="OpenTabColorPickerCommandKey" xml:space="preserve"> | ||||||
<value>Set the tab color</value> | ||||||
</data> | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -434,11 +434,14 @@ JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::SplitType) | |||||
|
||||||
JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::SettingsTarget) | ||||||
{ | ||||||
JSON_MAPPINGS(4) = { | ||||||
JSON_MAPPINGS(7) = { | ||||||
carlos-zamora marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
pair_type{ "settingsFile", ValueType::SettingsFile }, | ||||||
pair_type{ "defaultsFile", ValueType::DefaultsFile }, | ||||||
pair_type{ "allFiles", ValueType::AllFiles }, | ||||||
pair_type{ "settingsUI", ValueType::SettingsUI }, | ||||||
pair_type{ "fileExplorer", ValueType::FileExplorer }, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think this would be cleaner |
||||||
pair_type{ "sendInput", ValueType::SendInput }, | ||||||
pair_type{ "clipboard", ValueType::Clipboard }, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Discussed this as a team. I see value in opening the directory, but |
||||||
}; | ||||||
}; | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -431,6 +431,9 @@ | |||||||||
{ "command": { "action": "openSettings", "target": "settingsUI" }, "id": "Terminal.OpenSettingsUI" }, | ||||||||||
{ "command": { "action": "openSettings", "target": "settingsFile" }, "id": "Terminal.OpenSettingsFile" }, | ||||||||||
{ "command": { "action": "openSettings", "target": "defaultsFile" }, "id": "Terminal.OpenDefaultSettingsFile" }, | ||||||||||
{ "command": { "action": "openSettings", "target": "sendInput" }, "id": "Terminal.SendInputSettingsFile" }, | ||||||||||
{ "command": { "action": "openSettings", "target": "fileExplorer" }, "id": "Terminal.FileExplorerSettingsFile" }, | ||||||||||
{ "command": { "action": "openSettings", "target": "clipboard" }, "id": "Terminal.ClipboardSettingsFile" }, | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
{ "command": "find", "id": "Terminal.FindText" }, | ||||||||||
{ "command": { "action": "findMatch", "direction": "next" }, "id": "Terminal.FindNextMatch" }, | ||||||||||
{ "command": { "action": "findMatch", "direction": "prev" }, "id": "Terminal.FindPrevMatch" }, | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
.c_str()
is unnecessary, if not detrimental, because constructing a string-view from a nullptr is UB.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. (Sorry, I should have thought that through)
Let me know if I should remove the other 2 actions. Fwiw, the send input one is what I have found most useful, I don't think I have ever actually used the other 2 outside of testing. But that is probably just because of my personal workflows.