mirror of
https://github.com/nushell/nushell.git
synced 2025-01-03 04:50:28 +01:00
5f3c8d45d8
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx
you can also mention related issues, PRs or discussions!
-->
# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.
Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->
In this PR I continued the idea of #11494, it added an `auto` option to
the ansi coloring config option, I did this too but in a more simple
approach.
So I added a new enum `UseAnsiColoring` with the three values `True`,
`False` and `Auto`. When that value is set to `auto`, the default value,
it will use `std::io::stdout().is_terminal()` to decided whether to use
ansi coloring. This allows to dynamically decide whether to print ansi
color codes or not, [cargo does it the same
way](
|
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
Cargo.toml | ||
LICENSE | ||
README.md |
Collection of small utilities that are shared across Nushell crates.
This crate should compile early in the crate graph and thus not depend on major dependencies or core-nushell crates itself.
Internal Nushell crate
This crate implements components of Nushell and is not designed to support plugin authors or other users directly.