Skip to content

Commit 8762970

Browse files
authored
Change the default style for windows from fruity to auto (#1268)
1 parent 3856f94 commit 8762970

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2323
- Fixed auto addition of XML declaration to every formatted XML response. ([#1156](https://github.com/httpie/httpie/issues/1156))
2424
- Fixed highlighting when `Content-Type` specifies `charset`. ([#1242](https://github.com/httpie/httpie/issues/1242))
2525
- Fixed an unexpected crash when `--raw` is used with `--chunked`. ([#1253](https://github.com/httpie/httpie/issues/1253))
26+
- Changed the default Windows theme from `fruity` to `auto`. ([#1266](https://github.com/httpie/httpie/issues/1266))
2627

2728
## [2.6.0](https://github.com/httpie/httpie/compare/2.5.0...2.6.0) (2021-10-14)
2829

httpie/output/formatters/colors.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from ..lexers.json import EnhancedJsonLexer
1919
from ..lexers.metadata import MetadataLexer
2020
from ..ui.palette import SHADE_NAMES, get_color
21-
from ...compat import is_windows
2221
from ...context import Environment
2322
from ...plugins import FormatterPlugin
2423

@@ -27,11 +26,6 @@
2726
DEFAULT_STYLE = AUTO_STYLE
2827
SOLARIZED_STYLE = 'solarized' # Bundled here
2928

30-
if is_windows:
31-
# Colors on Windows via colorama don't look that
32-
# great and fruity seems to give the best result there.
33-
DEFAULT_STYLE = 'fruity'
34-
3529
BUNDLED_STYLES = {
3630
SOLARIZED_STYLE,
3731
AUTO_STYLE

tests/test_json.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from httpie.cli.constants import PRETTY_MAP
77
from httpie.cli.exceptions import ParseError
88
from httpie.cli.nested_json import HTTPieSyntaxError
9-
from httpie.compat import is_windows
109
from httpie.output.formatters.colors import ColorFormatter
1110
from httpie.utils import JsonDictPreservingDuplicateKeys
1211

@@ -39,7 +38,7 @@
3938
False,
4039
None,
4140
]
42-
TEST_PREFIX_TOKEN_COLOR = '\x1b[38;5;15m' if is_windows else '\x1b[04m\x1b[91m'
41+
TEST_PREFIX_TOKEN_COLOR = '\x1b[04m\x1b[91m'
4342

4443
JSON_WITH_DUPES_RAW = '{"key": 15, "key": 15, "key": 3, "key": 7}'
4544
JSON_WITH_DUPES_FORMATTED_SORTED = """{

0 commit comments

Comments
 (0)