| 440 | } |
| 441 | |
| 442 | CEStr CommandTasks::GetFirstCommandForPrompt() const |
| 443 | { |
| 444 | CEStr lsData; |
| 445 | LPCWSTR pszTemp = this->pszCommands; |
| 446 | if ((pszTemp = NextLine(pszTemp, lsData))) |
| 447 | { |
| 448 | RConStartArgsEx args; |
| 449 | const auto* const pszRaw = gpConEmu->ParseScriptLineOptions(lsData.ms_Val, nullptr, nullptr); |
| 450 | if (pszRaw) |
| 451 | { |
| 452 | args.pszSpecialCmd = lstrdup(pszRaw).Detach(); |
| 453 | // Parse all -new_console's |
| 454 | args.ProcessNewConArg(); |
| 455 | // Prohibit external requests for credentials |
| 456 | args.CleanPermissions(); |
| 457 | // Directory? |
| 458 | if (!args.pszStartupDir && this->pszGuiArgs) |
| 459 | { |
| 460 | this->ParseGuiArgs(&args); |
| 461 | } |
| 462 | // Prepare for execution |
| 463 | lsData = args.CreateCommandLine(false); |
| 464 | } |
| 465 | } |
| 466 | return lsData; |
| 467 | } |
no test coverage detected