mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
colors: `COLOR_RESULTS
switched to
False
` for non-interactive command case (#5562)
### Motivation Running commands with disabled `COLOR_RESULTS` around 40% faster. It should be by default. Closes #5561 --------- Co-authored-by: a <1@1.1> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
69dce1b293
commit
ae7fefee06
2 changed files with 24 additions and 0 deletions
23
news/disable_colors_non_int.rst
Normal file
23
news/disable_colors_non_int.rst
Normal file
|
@ -0,0 +1,23 @@
|
|||
**Added:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Changed:**
|
||||
|
||||
* ``COLOR_RESULTS`` switched to ``False`` for non-interactive command case to improve speed in default behavior (#5562).
|
||||
|
||||
**Deprecated:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Removed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Security:**
|
||||
|
||||
* <news item>
|
|
@ -426,6 +426,7 @@ def premain(argv=None):
|
|||
"XONSH_INTERACTIVE": args.force_interactive
|
||||
or (args.mode == XonshMode.interactive),
|
||||
}
|
||||
pre_env["COLOR_RESULTS"] = os.getenv("COLOR_RESULTS", pre_env["XONSH_INTERACTIVE"])
|
||||
|
||||
# Load -DVAR=VAL arguments.
|
||||
if args.defines is not None:
|
||||
|
|
Loading…
Add table
Reference in a new issue