/* Converts the command line to its post-processed form. this replaces variables and alias' per UEFI Shell spec. */
EFI_STATUS ProcessCommandLineToFinal(IN OUT CHAR16 **CmdLine)
/* Converts the command line to its post-processed form. this replaces variables and alias' per UEFI Shell spec. */
EFI_STATUS ProcessCommandLineToFinal(IN OUT CHAR16 **CmdLine)
{
  EFI_STATUS  Status;
  TrimSpaces (CmdLine);
  Status = ShellSubstituteAliases (CmdLine);
  if (EFI_ERROR (Status)) {
    return (Status);
  }
  TrimSpaces (CmdLine);
  Status = ShellSubstituteVariables (CmdLine);
  if (EFI_ERROR (Status)) {
    return (Status);
  }
  ASSERT (*CmdLine != NULL);
  TrimSpaces (CmdLine);
  if (StrStr (*CmdLine, L"?") != NULL) {
    Status = DoHelpUpdate (CmdLine);
  }
  TrimSpaces (CmdLine);
  return (EFI_SUCCESS);
}