Change the default style for windows from fruity to auto (#1268)

This commit is contained in:
Batuhan Taskaya 2022-01-14 19:47:10 +03:00 committed by GitHub
parent 3856f94d3d
commit 87629706c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 8 deletions

View File

@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Fixed auto addition of XML declaration to every formatted XML response. ([#1156](https://github.com/httpie/httpie/issues/1156)) - Fixed auto addition of XML declaration to every formatted XML response. ([#1156](https://github.com/httpie/httpie/issues/1156))
- Fixed highlighting when `Content-Type` specifies `charset`. ([#1242](https://github.com/httpie/httpie/issues/1242)) - Fixed highlighting when `Content-Type` specifies `charset`. ([#1242](https://github.com/httpie/httpie/issues/1242))
- Fixed an unexpected crash when `--raw` is used with `--chunked`. ([#1253](https://github.com/httpie/httpie/issues/1253)) - Fixed an unexpected crash when `--raw` is used with `--chunked`. ([#1253](https://github.com/httpie/httpie/issues/1253))
- Changed the default Windows theme from `fruity` to `auto`. ([#1266](https://github.com/httpie/httpie/issues/1266))
## [2.6.0](https://github.com/httpie/httpie/compare/2.5.0...2.6.0) (2021-10-14) ## [2.6.0](https://github.com/httpie/httpie/compare/2.5.0...2.6.0) (2021-10-14)

View File

@ -18,7 +18,6 @@ from pygments.util import ClassNotFound
from ..lexers.json import EnhancedJsonLexer from ..lexers.json import EnhancedJsonLexer
from ..lexers.metadata import MetadataLexer from ..lexers.metadata import MetadataLexer
from ..ui.palette import SHADE_NAMES, get_color from ..ui.palette import SHADE_NAMES, get_color
from ...compat import is_windows
from ...context import Environment from ...context import Environment
from ...plugins import FormatterPlugin from ...plugins import FormatterPlugin
@ -27,11 +26,6 @@ AUTO_STYLE = 'auto' # Follows terminal ANSI color styles
DEFAULT_STYLE = AUTO_STYLE DEFAULT_STYLE = AUTO_STYLE
SOLARIZED_STYLE = 'solarized' # Bundled here SOLARIZED_STYLE = 'solarized' # Bundled here
if is_windows:
# Colors on Windows via colorama don't look that
# great and fruity seems to give the best result there.
DEFAULT_STYLE = 'fruity'
BUNDLED_STYLES = { BUNDLED_STYLES = {
SOLARIZED_STYLE, SOLARIZED_STYLE,
AUTO_STYLE AUTO_STYLE

View File

@ -6,7 +6,6 @@ import responses
from httpie.cli.constants import PRETTY_MAP from httpie.cli.constants import PRETTY_MAP
from httpie.cli.exceptions import ParseError from httpie.cli.exceptions import ParseError
from httpie.cli.nested_json import HTTPieSyntaxError from httpie.cli.nested_json import HTTPieSyntaxError
from httpie.compat import is_windows
from httpie.output.formatters.colors import ColorFormatter from httpie.output.formatters.colors import ColorFormatter
from httpie.utils import JsonDictPreservingDuplicateKeys from httpie.utils import JsonDictPreservingDuplicateKeys
@ -39,7 +38,7 @@ TEST_JSON_VALUES = [
False, False,
None, None,
] ]
TEST_PREFIX_TOKEN_COLOR = '\x1b[38;5;15m' if is_windows else '\x1b[04m\x1b[91m' TEST_PREFIX_TOKEN_COLOR = '\x1b[04m\x1b[91m'
JSON_WITH_DUPES_RAW = '{"key": 15, "key": 15, "key": 3, "key": 7}' JSON_WITH_DUPES_RAW = '{"key": 15, "key": 15, "key": 3, "key": 7}'
JSON_WITH_DUPES_FORMATTED_SORTED = """{ JSON_WITH_DUPES_FORMATTED_SORTED = """{