aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/misc.py
diff options
context:
space:
mode:
authorYasushi SHOJI <yashi@atmark-techno.com>2017-05-10 14:49:01 +0900
committerJussi Pakkanen <jpakkane@gmail.com>2017-05-15 22:02:06 +0300
commitabd12b69eab4340eb5705a57e86ea254854cec24 (patch)
treee70fde2f87428e98c776c57dcd33eb34012b6d7b /mesonbuild/dependencies/misc.py
parenta3856be1d50eaefe32fee5d3347d55d934d15b50 (diff)
downloadmeson-abd12b69eab4340eb5705a57e86ea254854cec24.zip
meson-abd12b69eab4340eb5705a57e86ea254854cec24.tar.gz
meson-abd12b69eab4340eb5705a57e86ea254854cec24.tar.bz2
mesonconf: reorder output columns
mesonconf prints build dir information in the order of 'Option' 'Description' 'Current Value' and, optionally, 'Possible Value'. The Description tends to be longer and push the following values far right, sometimes way far than fits in the full screen size of a terminal on a FullHD monitor. Experienced users know which options they want to change without looking at the description string however they need to check the current values for sure. This patch moves the description to the last column. Now mesonconf prints options in the following order: 'Option' 'Current Value' 'Possible Value' 'Description' To implement this, mainly print_aligned() is modified. The second argument of the function is changed from - array of array of string to - array of dict with 'name', 'descr', 'value', and 'choices, which maps to 'option', 'description', 'current value' and 'possible values', respectively. Since the position of the possible values are moved before its description, the presence and the length of it affects header as well as the following description. Thus, we cal curate it before printing the header. To avoid re-calculation, we keep string version of the values and flattened version of the possible values _in the given array_, which means that now the print_aligned() function modify the the given array. The current callers do not use the passing array. So there should be no bad effects.
Diffstat (limited to 'mesonbuild/dependencies/misc.py')
0 files changed, 0 insertions, 0 deletions