\fBovsdb\-client help\fR
.IP "Output formatting options:"
[\fB--format=\fIformat\fR]
-[\fB--wide\fR]
[\fB--no-heading\fR]
.so lib/daemon-syn.man
.so lib/vlog-syn.man
Comma-separated values as defined in RFC 4180.
.RE
.
-.IP "\fB--wide\fR"
-In \fBtable\fR output (the default), when standard output is a
-terminal device, by default lines are truncated at a width of 79
-characters. Specifying this option prevents line truncation.
-.
.IP "\fB--no-heading\fR"
This option suppresses the heading row that otherwise appears in the
first row of table output.
FMT_CSV /* Comma-separated lines. */
} output_format;
-/* --wide: For --format=table, the maximum output width. */
-static int output_width;
-
/* --no-headings: Whether table output should include headings. */
static int output_headings = true;
OPT_BOOTSTRAP_CA_CERT = UCHAR_MAX + 1
};
static struct option long_options[] = {
- {"wide", no_argument, &output_width, INT_MAX},
{"format", required_argument, 0, 'f'},
{"no-headings", no_argument, &output_headings, 0},
{"pretty", no_argument, &json_flags, JSSF_PRETTY | JSSF_SORT},
};
char *short_options = long_options_to_short_options(long_options);
- output_width = isatty(fileno(stdout)) ? 79 : INT_MAX;
for (;;) {
int c;
}
break;
- case 'w':
- output_width = INT_MAX;
- break;
-
case 'h':
usage();
printf("\nOutput formatting options:\n"
" -f, --format=FORMAT set output formatting to FORMAT\n"
" (\"table\", \"html\", or \"csv\"\n"
- " --wide don't limit TTY lines to 79 bytes\n"
" --no-headings omit table heading row\n"
" --pretty pretty-print JSON in output");
daemon_usage();
}
static void
-table_print_table_line__(struct ds *line, size_t max_width)
+table_print_table_line__(struct ds *line)
{
- ds_truncate(line, max_width);
puts(ds_cstr(line));
ds_clear(line);
}
}
ds_put_format(&line, "%-*s", column->width, column->heading);
}
- table_print_table_line__(&line, output_width);
+ table_print_table_line__(&line);
for (x = 0; x < table->n_columns; x++) {
const struct column *column = &table->columns[x];
ds_put_char(&line, '-');
}
}
- table_print_table_line__(&line, output_width);
+ table_print_table_line__(&line);
}
for (y = 0; y < table->n_rows; y++) {
}
ds_put_format(&line, "%-*s", table->columns[x].width, cell);
}
- table_print_table_line__(&line, output_width);
+ table_print_table_line__(&line);
}
ds_destroy(&line);