gui-cs / F7History

Use F7 as "Show Command History" in Powershell
MIT License
58 stars 6 forks source link

An exception occurred in custom key handler #15

Open woanware opened 1 year ago

woanware commented 1 year ago

Hi,

Had the value shown below on the command line, then hit F7 which generated an error:

.\k

Error:

An exception occurred in custom key handler, see $error for more information: Invalid pattern '.\k' at offset 2. Malformed \\k<...> named back reference.
PS E:\Dev\Work> $error
Out-ConsoleGridView: Invalid pattern '.\k' at offset 2. Malformed \\k<...> named back reference.
Out-ConsoleGridView: Invalid pattern '.\Kusto' at offset 3. Unrecognized escape sequence \\K.
Out-ConsoleGridView: Invalid pattern '.\Kusto' at offset 3. Unrecognized escape sequence \\K.
.\kustoF7History: The term '.\kustoF7History' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Out-ConsoleGridView: Invalid pattern '.\kusto' at offset 4. Malformed \\k<...> named back reference.

Thanks!

tig commented 1 year ago

Can repo. Will dig into it asap. Thanks for the report.

tig commented 1 year ago

This should be fixed within OutConsoleGridView. I've filed a new issue for it here:

https://github.com/PowerShell/GraphicalTools/issues/225