master
h 54 lines 1.34 KB
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 SettingsCommand.h
8
9 Abstract:
10
11 Declaration of SettingsCommand command tree.
12
13 --*/
14 #pragma once
15 #include "Command.h"
16
17 namespace wsl::windows::wslc {
18
19 // Root settings command: opens the settings file in the user's default editor.
20 struct SettingsCommand final : public Command
21 {
22 constexpr static std::wstring_view CommandName = L"settings";
23
24 SettingsCommand(const std::wstring& parent) : Command(CommandName, parent)
25 {
26 }
27
28 std::vector<std::unique_ptr<Command>> GetCommands() const override;
29 std::vector<Argument> GetArguments() const override;
30 std::wstring ShortDescription() const override;
31 std::wstring LongDescription() const override;
32
33 protected:
34 void ExecuteInternal(CLIExecutionContext& context) const override;
35 };
36
37 // Resets the settings file to built-in defaults.
38 struct SettingsResetCommand final : public Command
39 {
40 constexpr static std::wstring_view CommandName = L"reset";
41
42 SettingsResetCommand(const std::wstring& parent) : Command(CommandName, parent)
43 {
44 }
45
46 std::vector<Argument> GetArguments() const override;
47 std::wstring ShortDescription() const override;
48 std::wstring LongDescription() const override;
49
50 protected:
51 void ExecuteInternal(CLIExecutionContext& context) const override;
52 };
53
54 } // namespace wsl::windows::wslc