When a terminal command contains # or ; it should not be treated as commend. Broken use case example:
A >> $(start powershell -NoExit -command "$Host.UI.RawUI.WindowTitle = 'PowerShell'; cd ~")
; here breaks the config.
To fix it I moved comment parsing logic to ParseKeySequence.cpp, so we are aware of a context where a comment is found. However, we should still trim macros before processing the sequence, since they cannot contain terminal commands (original behavior) and comments in modifier blocks are unacceptable. This does not break:
MyMacro = A B C# comment
A >> Shift{MyMacro}
All tests passed successfully. Needed to do #include <sstream> fix in test.h too.
When a terminal command contains
#
or;
it should not be treated as commend. Broken use case example:;
here breaks the config.To fix it I moved comment parsing logic to
ParseKeySequence.cpp
, so we are aware of a context where a comment is found. However, we should still trim macros before processing the sequence, since they cannot contain terminal commands (original behavior) and comments in modifier blocks are unacceptable. This does not break:All tests passed successfully. Needed to do
#include <sstream>
fix intest.h
too.