mirror of
https://github.com/openharmony/third_party_rust_termcolor.git
synced 2026-06-30 21:37:57 -04:00
@@ -9,7 +9,7 @@ applications.
|
||||
[](https://github.com/BurntSushi/termcolor/actions)
|
||||
[](https://crates.io/crates/termcolor)
|
||||
|
||||
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
|
||||
Dual-licensed under MIT or the [UNLICENSE](https://unlicense.org/).
|
||||
|
||||
### Documentation
|
||||
|
||||
@@ -85,7 +85,7 @@ fn write_green() -> io::Result<()> {
|
||||
### Automatic color selection
|
||||
|
||||
When building a writer with termcolor, the caller must provide a
|
||||
[`ColorChoice`](https://docs.rs/termcolor/1.0.5/termcolor/enum.ColorChoice.html)
|
||||
[`ColorChoice`](https://docs.rs/termcolor/1.*/termcolor/enum.ColorChoice.html)
|
||||
selection. When the color choice is `Auto`, termcolor will attempt to determine
|
||||
whether colors should be enabled by inspecting the environment. Currently,
|
||||
termcolor will inspect the `TERM` and `NO_COLOR` environment variables:
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ In many scenarios when using color, one often wants to enable colors
|
||||
automatically when writing to a terminal and disable colors automatically when
|
||||
writing to anything else. The typical way to achieve this in Unix environments
|
||||
is via libc's
|
||||
[`isatty`](http://man7.org/linux/man-pages/man3/isatty.3.html)
|
||||
[`isatty`](https://man7.org/linux/man-pages/man3/isatty.3.html)
|
||||
function.
|
||||
Unfortunately, this notoriously does not work well in Windows environments. To
|
||||
work around that, the currently recommended solution is to use the
|
||||
|
||||
+3
-4
@@ -1,12 +1,12 @@
|
||||
## **This crate has reached its end-of-life and is now deprecated.**
|
||||
|
||||
This crate was rolled into the
|
||||
[`winapi-util`](https://crates.io/crate/winapi-util)
|
||||
[`winapi-util`](https://crates.io/crates/winapi-util)
|
||||
crate since `wincolor` is quite small and didn't otherwise have a good reason
|
||||
for living life as a distinct crate.
|
||||
|
||||
The
|
||||
[`console`](https://docs.rs/winapi-util/0.1.3/x86_64-pc-windows-msvc/winapi_util/console/index.html)
|
||||
[`console`](https://docs.rs/winapi-util/0.1.*/x86_64-pc-windows-msvc/winapi_util/console/index.html)
|
||||
module of `winapi-util` is a drop-in replacement for `wincolor`.
|
||||
|
||||
wincolor
|
||||
@@ -15,10 +15,9 @@ A simple Windows specific API for controlling text color in a Windows console.
|
||||
The purpose of this crate is to expose the full inflexibility of the Windows
|
||||
console without any platform independent abstraction.
|
||||
|
||||
[](https://ci.appveyor.com/project/BurntSushi/ripgrep)
|
||||
[](https://crates.io/crates/wincolor)
|
||||
|
||||
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
|
||||
Dual-licensed under MIT or the [UNLICENSE](https://unlicense.org/).
|
||||
|
||||
### Documentation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user