*-f*, *--fs*::
Output info about filesystems. This option is equivalent to *-o NAME,FSTYPE,FSVER,LABEL,UUID,FSAVAIL,FSUSE%,MOUNTPOINTS*. The authoritative information about filesystems and raids is provided by the *blkid*(8) command.
+*--hyperlink*[=_mode_]::
+Print mountpoint paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
+
*-I*, *--include* _list_::
Include devices specified by the comma-separated _list_ of major device numbers. The filter is applied to the top-level devices only. This may be confusing for *--list* output format where hierarchy of the devices is not obvious.
ce = scols_line_get_cell(ln, colnum);
if (!ce)
return;
+
rc = datasiz ? scols_cell_refer_memory(ce, data, datasiz)
: scols_cell_refer_data(ce, data);
if (rc)
err(EXIT_FAILURE, _("failed to add output data"));
+
+ if (lsblk->uri && (id == COL_TARGETS || id == COL_TARGET) && dev->is_swap)
+ scols_cell_disable_uri(ce, 1);
}
static int filter_filler_cb(
OPT_COUNTER_FILTER,
OPT_COUNTER,
OPT_HIGHLIGHT,
- OPT_PROPERTIES_BY
+ OPT_PROPERTIES_BY,
+ OPT_HYPERLINK
};
static const struct option longopts[] = {
{ "output-all", no_argument, NULL, 'O' },
{ "filter", required_argument, NULL, 'Q' },
{ "highlight", required_argument, NULL, OPT_HIGHLIGHT },
+ { "hyperlink", optional_argument, NULL, OPT_HYPERLINK },
{ "merge", no_argument, NULL, 'M' },
{ "perms", no_argument, NULL, 'm' },
{ "noheadings", no_argument, NULL, 'n' },
if (lsblk_set_properties_method(optarg) < 0)
errtryhelp(EXIT_FAILURE);
break;
+ case OPT_HYPERLINK:
+ if (hyperlinkwanted_or_err(optarg,
+ _("invalid hyperlink argument")))
+ lsblk->uri = xgethosturi(NULL);
+ break;
case 'H':
collist = 1;
break;
if (fl & SCOLS_FL_WRAP)
scols_column_set_wrapfunc(cl, NULL, scols_wrapzero_nextchunk, NULL);
+ if (lsblk->uri && (id == COL_TARGET || id == COL_TARGETS))
+ scols_column_set_uri(cl, lsblk->uri);
+
set_column_type(ci, cl, fl);
}