diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-18 18:58:25 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-18 18:58:25 +0000 |
commit | 0d11446d51c796ce1c46944584764bcbd91a4fd2 (patch) | |
tree | 07549a28107a691a76046608839c0f672e5d8eea /ShellPkg | |
parent | 73c83c69c0f42f96bd3b74326b77c5fd528145df (diff) | |
download | edk2-platforms-0d11446d51c796ce1c46944584764bcbd91a4fd2.tar.xz |
ShellPkg: Updates the printing of echo for script commands to after the @ checking.
The add and remove are really a move of the code block from before the @ parsing into the else block.
Signed-off-by: jcarsey
Reviewed-by: leegrosenbaum
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12741 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r-- | ShellPkg/Application/Shell/Shell.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index d266c826e9..05a3cb5b82 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -1815,15 +1815,6 @@ RunScriptFileHandle ( //
} else {
if (CommandLine3 != NULL && StrLen(CommandLine3) > 0) {
- if (ShellCommandGetEchoState()) {
- CurDir = ShellInfoObject.NewEfiShellProtocol->GetEnv(L"cwd");
- if (CurDir != NULL && StrLen(CurDir) > 1) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_CURDIR), ShellInfoObject.HiiHandle, CurDir);
- } else {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_SHELL), ShellInfoObject.HiiHandle);
- }
- ShellPrintEx(-1, -1, L"%s\r\n", CommandLine2);
- }
if (CommandLine3[0] == L'@') {
//
// We need to save the current echo state
@@ -1838,6 +1829,15 @@ RunScriptFileHandle ( //
ShellCommandSetEchoState(PreCommandEchoState);
} else {
+ if (ShellCommandGetEchoState()) {
+ CurDir = ShellInfoObject.NewEfiShellProtocol->GetEnv(L"cwd");
+ if (CurDir != NULL && StrLen(CurDir) > 1) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_CURDIR), ShellInfoObject.HiiHandle, CurDir);
+ } else {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_SHELL), ShellInfoObject.HiiHandle);
+ }
+ ShellPrintEx(-1, -1, L"%s\r\n", CommandLine2);
+ }
Status = RunCommand(CommandLine3);
}
}
|