nmcli: don't substitute empty strings with "--" in terse mode
This commit is contained in:
@@ -1072,12 +1072,17 @@ print_required_fields (NmCli *nmc, const NmcOutputField field_values[])
|
|||||||
gboolean section_prefix = field_values[0].flags & NMC_OF_FLAG_SECTION_PREFIX;
|
gboolean section_prefix = field_values[0].flags & NMC_OF_FLAG_SECTION_PREFIX;
|
||||||
gboolean main_header = main_header_add || main_header_only;
|
gboolean main_header = main_header_add || main_header_only;
|
||||||
|
|
||||||
|
if (terse) {
|
||||||
/* No headers are printed in terse mode:
|
/* No headers are printed in terse mode:
|
||||||
* - neither main header nor field (column) names
|
* - neither main header nor field (column) names
|
||||||
*/
|
*/
|
||||||
if ((main_header_only || field_names) && terse)
|
if (main_header_only || field_names)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* Don't substitute empty strings in terse mode */
|
||||||
|
not_set_str = "";
|
||||||
|
}
|
||||||
|
|
||||||
if (multiline) {
|
if (multiline) {
|
||||||
/* --- Multiline mode --- */
|
/* --- Multiline mode --- */
|
||||||
enum { ML_HEADER_WIDTH = 79 };
|
enum { ML_HEADER_WIDTH = 79 };
|
||||||
|
Reference in New Issue
Block a user