*--table-column* or it's column number in order as specified by input. It's
possible to mix names and numbers. The special placeholder '0' (e.g. -R0) may
be used to specify all columns and '-1' (e.g. -R -1) to specify the last visible column.
+It's possible to use ranges like '1-5' when addressing columns by numbers.
*-J, --json*::
Use JSON output format to print the table, the option *--table-columns* is required and the option *--table-name* is recommended.
/* apply to columns specified by name */
STRV_FOREACH(one, all) {
+ int low = 0, up = 0;
+
if (strcmp(*one, "-") == 0) {
unnamed = 1;
continue;
}
+
+ /* parse range (N-M) */
+ if (strchr(*one, '-') && parse_range(*one, &low, &up, 0) == 0) {
+ for (; low <= up; low++) {
+ cl = scols_table_get_column(ctl->tab, low);
+ if (cl)
+ column_set_flag(cl, flag);
+ }
+ continue;
+ }
+
+ /* one item in the list */
cl = string_to_column(ctl, *one);
if (cl)
column_set_flag(cl, flag);