Repository: microsoft/terminal
File: src/cascadia/TerminalApp/AppCommandlineArgs.cpp (C++)

Code before:
                                             RS_A(L"CmdFocusTabPrevArgDesc"));
        nextOpt->excludes(prevOpt);
        indexOpt->excludes(prevOpt);
        indexOpt->excludes(nextOpt);

        // When ParseCommand is called, if this subcommand was provided, this
        // callback function will be triggered on the same thread. We can be sure
        // that `this` will still be safe - this function just lets us know this
        // command was parsed.
        subcommand->callback([&, this]() {
            // Build the action from the values we've parsed on the commandline.
            ActionAndArgs focusTabAction{};

            if (_focusTabIndex >= 0)
            {
                focusTabAction.Action(ShortcutAction::SwitchToTab);
                SwitchToTabArgs args{ static_cast<unsigned int>(_focusTabIndex) };
                focusTabAction.Args(args);
                _startupActions.push_back(focusTabAction);
            }
            else if (_focusNextTab || _focusPrevTab)
            {
                focusTabAction.Action(_focusNextTab ? ShortcutAction::NextTab : ShortcutAction::PrevTab);
                focusTabAction.Args(_focusNextTab ?
                                        static_cast<IActionArgs>(NextTabArgs(TabSwitcherMode::Disabled)) :
                                        static_cast<IActionArgs>(PrevTabArgs(TabSwitcherMode::Disabled)));
                _startupActions.push_back(std::move(focusTabAction));
            }
        });
    };

    setupSubcommand(_focusTabCommand);
    setupSubcommand(_focusTabShort);
}

// Method Description:
// - Adds the `move-focus` subcommand and related options to the commandline parser.
// - Additionally adds the `mf` subcommand, which is just a shortened version of `move-focus`
// Arguments:
// - <none>
// Return Value:
// - <none>
void AppCommandlineArgs::_buildMoveFocusParser()
{
    _moveFocusCommand = _app.add_subcommand("move-focus", RS_A(L"CmdMoveFocusDesc"));
    _moveFocusShort = _app.add_subcommand("mf", RS_A(L"CmdMFDesc"));

    auto setupSubcommand = [this](auto* subcommand) {
        std::map<std::string, FocusDirection> map = {
            { "left", FocusDirection::Left },
            { "right", FocusDirection::Right },

Review comment (suggestion):
```suggestion
                // GH#10070 - make sure to not use the MRU order when switching 
                // tabs on the commandline. That wouldn't make any sense!
                focusTabAction.Args(_focusNextTab ?
```

Code after:
                                             RS_A(L"CmdFocusTabPrevArgDesc"));
        nextOpt->excludes(prevOpt);
        indexOpt->excludes(prevOpt);
        indexOpt->excludes(nextOpt);

        // When ParseCommand is called, if this subcommand was provided, this
        // callback function will be triggered on the same thread. We can be sure
        // that `this` will still be safe - this function just lets us know this
        // command was parsed.
        subcommand->callback([&, this]() {
            // Build the action from the values we've parsed on the commandline.
            ActionAndArgs focusTabAction{};

            if (_focusTabIndex >= 0)
            {
                focusTabAction.Action(ShortcutAction::SwitchToTab);
                SwitchToTabArgs args{ static_cast<unsigned int>(_focusTabIndex) };
                focusTabAction.Args(args);
                _startupActions.push_back(focusTabAction);
            }
            else if (_focusNextTab || _focusPrevTab)
            {
                focusTabAction.Action(_focusNextTab ? ShortcutAction::NextTab : ShortcutAction::PrevTab);
                // GH#10070 - make sure to not use the MRU order when switching
                // tabs on the commandline. That wouldn't make any sense!
                focusTabAction.Args(_focusNextTab ?
                                        static_cast<IActionArgs>(NextTabArgs(TabSwitcherMode::Disabled)) :
                                        static_cast<IActionArgs>(PrevTabArgs(TabSwitcherMode::Disabled)));
                _startupActions.push_back(std::move(focusTabAction));
            }
        });
    };

    setupSubcommand(_focusTabCommand);
    setupSubcommand(_focusTabShort);
}

// Method Description:
// - Adds the `move-focus` subcommand and related options to the commandline parser.
// - Additionally adds the `mf` subcommand, which is just a shortened version of `move-focus`
// Arguments:
// - <none>
// Return Value:
// - <none>
void AppCommandlineArgs::_buildMoveFocusParser()
{
    _moveFocusCommand = _app.add_subcommand("move-focus", RS_A(L"CmdMoveFocusDesc"));
    _moveFocusShort = _app.add_subcommand("mf", RS_A(L"CmdMFDesc"));

    auto setupSubcommand = [this](auto* subcommand) {
        std::map<std::string, FocusDirection> map = {