Skip to content

Enable bat to find more binary on Windows#2580

Closed
mataha wants to merge 1 commit into
sharkdp:masterfrom
mataha:fix/windows-more
Closed

Enable bat to find more binary on Windows#2580
mataha wants to merge 1 commit into
sharkdp:masterfrom
mataha:fix/windows-more

Conversation

@mataha

@mataha mataha commented May 31, 2023

Copy link
Copy Markdown
Contributor

On Windows, more is a COM executable (i.e. its extension is com). As resolve_binary() tries to emulate the behaviour of Win32 API's CreateProcess(), it will search for more.exe and fail. This commit adds an exception to that by specifying the pager's binary explicitly.

Fixes #2570. See also BurntSushi/ripgrep#2523.

I'd like to add that more is not as bad as README makes it to be - it does support colors:

cmd_COSn24wvTg

Comment thread src/output.rs Outdated
On Windows, `more` is a COM executable (i.e. its extension is `com`).
As `resolve_binary()` previously tried to emulate the behaviour of Win32
API's `CreateProcess()`, it would search for `more.exe` and fail.
Comment thread Cargo.toml
@mataha

mataha commented Aug 28, 2023

Copy link
Copy Markdown
Contributor Author

Closing in favor of #2651.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bat refuses to page content

2 participants