Debian Codegraph @

doc/source/cli/monasca-formatting.rst

raw
1 ===================
2 Changing formatting
3 ===================
4
5 Changing displayed columns
6 --------------------------
7
8 If you want displayed columns in a list operation, ``-c`` option can be used.
9 ``-c`` can be specified multiple times and the column order will be same as
10 the order of ``-c`` options.
11
12 Changing format
13 ---------------
14
15 If you want to change the format data is displayed in, you can use ``-f``
16 option for that. Format can be specified just once and it affects they way
17 the data is printed to the ``STDOUT``. The available formats, data can be
18 presented in, can be checked with:
19
20 .. code-block:: text
21
22 monasca <command> --help
23
24 Look for section **output formatters** and the flag ``--format`` or ``-f``.
25 In most of the cases you will be able to pick one out of
26 ``csv``, ``json``, ``table``, ``value``, ``yaml``.
27
28 Affecting the width
29 -------------------
30
31 If, for some reason, you are not happy with the width the output has taken, you
32 can use ```--max-width {number}``` flag and set the value to
33 match your preference. Without that output will not be constrained
34 by the terminal width. Alternatively you may want to pass ``--fit-width``
35 to fit the output to display width. Remember that these flags
36 affect the output only if ``table`` formatter is used.