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

Code before:
                    if (arg.find(" ") != std::string::npos)
                    {
                        cmdlineBuffer << '"' << arg << '"';
                    }
                    else
                    {
                        cmdlineBuffer << arg;
                    }
                }

                args.Commandline(winrt::to_hstring(cmdlineBuffer.str()));
            }

            if (!_keyChordOption.empty())
            {
                args.KeyChord(winrt::to_hstring(_keyChordOption));
            }
            
            if (!_saveInputName.empty())
            {
                winrt::hstring hString = winrt::to_hstring(_saveInputName);
                args.Name(hString);
            }
            else
            {
                args.Name(args.GenerateName());
            }

            saveAction.Args(args);
            _startupActions.push_back(saveAction);
        });
    };

    setupSubcommand(_saveCommand);
}

// Method Description:
// - Add the `NewTerminalArgs` parameters to the given subcommand. This enables
//   that subcommand to support all the properties in a NewTerminalArgs.
// Arguments:
// - subcommand: the command to add the args to.
// Return Value:
// - <none>
void AppCommandlineArgs::_addNewTerminalArgs(AppCommandlineArgs::NewTerminalSubcommand& subcommand)
{
    subcommand.profileNameOption = subcommand.subcommand->add_option("-p,--profile",
                                                                     _profileName,
                                                                     RS_A(L"CmdProfileArgDesc"));
    subcommand.startingDirectoryOption = subcommand.subcommand->add_option("-d,--startingDirectory",
                                                                           _startingDirectory,
                                                                           RS_A(L"CmdStartingDirArgDesc"));

Review comment (suggestion):
This right here might not be right. In the case that you don't pass a `--name` explicitly, this ends up setting the `SaveTask::Name` to something like "Save task commandline: git status". Then later, we'll build the `SendInput` action, and set _it's_ name to "Save task commandline: git status".

The json for this will end up like 

```
{
    "command": 
    {
        "action": "sendInput",
        "input": "git status"
    },
    "name": "Save Task commandline: git status"
},
```

I'm pretty sure we'd want to just leave that `.Name` empty

Code after:
                    if (arg.find(" ") != std::string::npos)
                    {
                        cmdlineBuffer << '"' << arg << '"';
                    }
                    else
                    {
                        cmdlineBuffer << arg;
                    }
                }

                args.Commandline(winrt::to_hstring(cmdlineBuffer.str()));
            }

            if (!_keyChordOption.empty())
            {
                args.KeyChord(winrt::to_hstring(_keyChordOption));
            }

            if (!_saveInputName.empty())
            {
                winrt::hstring hString = winrt::to_hstring(_saveInputName);
                args.Name(hString);
            }

            saveSnippet.Args(args);
            _startupActions.push_back(saveSnippet);
        });
    };

    setupSubcommand(_saveCommand);
}

// Method Description:
// - Add the `NewTerminalArgs` parameters to the given subcommand. This enables
//   that subcommand to support all the properties in a NewTerminalArgs.
// Arguments:
// - subcommand: the command to add the args to.
// Return Value:
// - <none>
void AppCommandlineArgs::_addNewTerminalArgs(AppCommandlineArgs::NewTerminalSubcommand& subcommand)
{
    subcommand.profileNameOption = subcommand.subcommand->add_option("-p,--profile",
                                                                     _profileName,
                                                                     RS_A(L"CmdProfileArgDesc"));
    subcommand.sessionIdOption = subcommand.subcommand->add_option("--sessionId",
                                                                   _sessionId,
                                                                   RS_A(L"CmdSessionIdArgDesc"));
    subcommand.startingDirectoryOption = subcommand.subcommand->add_option("-d,--startingDirectory",
                                                                           _startingDirectory,
                                                                           RS_A(L"CmdStartingDirArgDesc"));
    subcommand.titleOption = subcommand.subcommand->add_option("--title",