diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-08-23 10:40:55 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-08-25 13:00:47 +0800 |
commit | 1219c85df42d5c9ed187565328e2f5cead5682ed (patch) | |
tree | 6966122ca6bd49845e3632aaaab622f4b68d790d /ShellPkg/Application/Shell/Shell.h | |
parent | a747bc1eecaff7c34afbc7a4acd81a8330e42d0a (diff) | |
download | edk2-platforms-1219c85df42d5c9ed187565328e2f5cead5682ed.tar.xz |
Revert "ShellPkg: Move FindFirstCharacter/GetNextParameter to ShellCommandLib"
This reverts commit c0bcd3433f33876c519bf5567e0ab69261b57fe9.
The above commit causes several regression of "echo" command:
1. Double quotes are not being stripped from the final text. UEFI Shell 2.2 section 3.4.5 chops out the quotes.
2. Output redirection is not working as expected. Text is being redirected, but the ‘> …’ text should not be.
3. Inconsistent special character handling. For example, comments with # seem to be parsed out correctly, but handing of ^ is incorrect.
In summary, ‘echo “You are ^#1” > t.txt’ results in the below content in t.txt:
“You are ^#1” > t.txt
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
Diffstat (limited to 'ShellPkg/Application/Shell/Shell.h')
-rw-r--r-- | ShellPkg/Application/Shell/Shell.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ShellPkg/Application/Shell/Shell.h b/ShellPkg/Application/Shell/Shell.h index a34c91ad1e..29b36b003a 100644 --- a/ShellPkg/Application/Shell/Shell.h +++ b/ShellPkg/Application/Shell/Shell.h @@ -371,6 +371,24 @@ RunScriptFile ( );
/**
+ Return the pointer to the first occurrence of any character from a list of characters.
+
+ @param[in] String the string to parse
+ @param[in] CharacterList the list of character to look for
+ @param[in] EscapeCharacter An escape character to skip
+
+ @return the location of the first character in the string
+ @retval CHAR_NULL no instance of any character in CharacterList was found in String
+**/
+CONST CHAR16*
+EFIAPI
+FindFirstCharacter(
+ IN CONST CHAR16 *String,
+ IN CONST CHAR16 *CharacterList,
+ IN CONST CHAR16 EscapeCharacter
+ );
+
+/**
Cleans off leading and trailing spaces and tabs.
@param[in] String pointer to the string to trim them off.
|