To prevent performance degradation, we will cache the result of GetConsoleOutputCP() after executing every external command.
--
v3: cmd: Use the console output code page to read batch files.
programs/cmd: Factor out code_page when searching for a label.
cmd/tests: Add updated code page test in batch file.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6885
To prevent performance degradation, we will cache the result of GetConsoleOutputCP() after executing every external command.
--
v2: cmd: Use the console output codepage to read batch files.
cmd/tests: Add updated code page test in batch file.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6885
On Sat Apr 19 16:23:57 2025 +0000, eric pouech wrote:
> forgot to say that executable files must be in considered directory
> (eg if a.exe and e.bat exist in current directory, then 'a\<tab\>' shall
> circle around both files); PATH is not used
My code already does this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101459
On Sat Apr 19 16:20:43 2025 +0000, eric pouech wrote:
> maybe. i could also be something that cmd implements in
> CONSOLE_READCONSOLE_CONTROL (using 0x1B in control mask).
That's how I'm handling it in current changes (not yet pushed). But I shouldn't need to, based on ReadConsole behaviour that I see on Windows.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101458
On Sat Apr 19 16:23:57 2025 +0000, Joe Souza wrote:
> Testing on Windows 11 this morning, I find that Windows does not filter
> on .EXE or anything in PATHEXT if tab key is hit for first word on
> command line.
forgot to say that executable files must be in considered directory
(eg if a.exe and e.bat exist in current directory, then 'a\<tab\>' shall circle around both files); PATH is not used
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101456
On Sat Apr 19 15:01:13 2025 +0000, Joe Souza wrote:
> A bug in Wine's ReadConsole implementation that I found while making
> these changes is that Wine does not handle ESC key correctly. On
> Windows, ESC key clears the text on the screen and clears the buffer.
> Wine emits the control character for the ESC key. I'll handle this in
> my changes and add a FIXME comment.
maybe. i could also be something that cmd implements in CONSOLE_READCONSOLE_CONTROL (using 0x1B in control mask).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101455