Skip to content

Commit

Permalink
- Fixed a parsing error with chained native command
Browse files Browse the repository at this point in the history
  • Loading branch information
sLill committed Sep 5, 2023
1 parent 5d55005 commit d46d5e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WindowsGrep/WindowsGrep.Core/Utils/ConsoleUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static void ClearConsole()

private static string GetCommandPattern(string commandDescriptor, bool expectsParameter)
{
string pattern = $"^{commandDescriptor}";
string pattern = $"(\\s|^){commandDescriptor}";
pattern = expectsParameter ? $"{pattern}\\s.*?(?<Parameter>.*?)$" : $"{pattern}[^\\S]*?$";

return pattern;
Expand Down

0 comments on commit d46d5e8

Please sign in to comment.