From 6c501d23c353940b823724061beaa4c5e53f64da Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Tue, 31 Aug 2021 22:52:16 +0200 Subject: [PATCH] Change default XML indent to 2 spaces --- README.rst | 6 +++--- httpie/cli/constants.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 6da3c33e..fb467869 100644 --- a/README.rst +++ b/README.rst @@ -1566,8 +1566,8 @@ You can further control the applied formatting via the more granular `format opt Format options -------------- -The ``--format-options`` option allows you to control how the output should be formatted when formatting is applied. -The following options are available: +The ``--format-options=opt1:value,opt2:value`` option allows you to control how the output should be formatted +when formatting is applied. The following options are available: +-------------------------------+---------------+------------------------------+ | Option | Default value | Shortcuts | @@ -1582,7 +1582,7 @@ The following options are available: +--------------------+----------+---------------+------------------------------+ | ``xml.format`` | ``true`` | N/A | +-------------------------------+---------------+------------------------------+ -| ``xml.indent`` | ``4`` | N/A | +| ``xml.indent`` | ``2`` | N/A | +--------------------+----------+---------------+------------------------------+ For example, this is how you would disable the default header and JSON key diff --git a/httpie/cli/constants.py b/httpie/cli/constants.py index ef6bf2c3..a1b78d33 100644 --- a/httpie/cli/constants.py +++ b/httpie/cli/constants.py @@ -91,7 +91,7 @@ DEFAULT_FORMAT_OPTIONS = [ 'json.indent:4', 'json.sort_keys:true', 'xml.format:true', - 'xml.indent:4', + 'xml.indent:2', ] SORTED_FORMAT_OPTIONS = [ 'headers.sort:true',